<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pybindgen.cppclass</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pybindgen-module.html">Package&nbsp;pybindgen</a> ::
        Module&nbsp;cppclass
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pybindgen.cppclass-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pybindgen.cppclass-module.html">Module pybindgen.cppclass</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">   1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L2"></a><tt class="py-lineno">   2</tt>  <tt class="py-line"><tt class="py-docstring">Wrap C++ classes and methods</tt> </tt>
<a name="L3"></a><tt class="py-lineno">   3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L4"></a><tt class="py-lineno">   4</tt>  <tt class="py-line"> </tt>
<a name="L5"></a><tt class="py-lineno">   5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">warnings</tt> </tt>
<a name="L6"></a><tt class="py-lineno">   6</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">traceback</tt> </tt>
<a name="L7"></a><tt class="py-lineno">   7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">   8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package pybindgen.typehandlers=pybindgen.typehandlers-module.html"><a title="pybindgen.typehandlers" class="py-name" href="#" onclick="return doclink('link-0', 'typehandlers', 'link-0');">typehandlers</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module pybindgen.typehandlers.base=pybindgen.typehandlers.base-module.html"><a title="pybindgen.typehandlers.base" class="py-name" href="#" onclick="return doclink('link-1', 'base', 'link-1');">base</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class pybindgen.typehandlers.base.Parameter=pybindgen.typehandlers.base.Parameter-class.html"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-2', 'Parameter', 'link-2');">Parameter</a></tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Class pybindgen.typehandlers.base.ReturnValue=pybindgen.typehandlers.base.ReturnValue-class.html"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-3', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L9"></a><tt class="py-lineno">   9</tt>  <tt class="py-line">    <tt id="link-4" class="py-name" targets="Function pybindgen.typehandlers.base.join_ctype_and_name()=pybindgen.typehandlers.base-module.html#join_ctype_and_name"><a title="pybindgen.typehandlers.base.join_ctype_and_name" class="py-name" href="#" onclick="return doclink('link-4', 'join_ctype_and_name', 'link-4');">join_ctype_and_name</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Class pybindgen.typehandlers.base.CodeGenerationError=pybindgen.typehandlers.base.CodeGenerationError-class.html"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-5', 'CodeGenerationError', 'link-5');">CodeGenerationError</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L10"></a><tt class="py-lineno">  10</tt>  <tt class="py-line">    <tt id="link-6" class="py-name" targets="Variable pybindgen.typehandlers.base.param_type_matcher=pybindgen.typehandlers.base-module.html#param_type_matcher"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-6', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Variable pybindgen.typehandlers.base.return_type_matcher=pybindgen.typehandlers.base-module.html#return_type_matcher"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-7', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name" targets="Class pybindgen.typehandlers.base.CodegenErrorBase=pybindgen.typehandlers.base.CodegenErrorBase-class.html"><a title="pybindgen.typehandlers.base.CodegenErrorBase" class="py-name" href="#" onclick="return doclink('link-8', 'CodegenErrorBase', 'link-8');">CodegenErrorBase</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L11"></a><tt class="py-lineno">  11</tt>  <tt class="py-line">    <tt id="link-9" class="py-name" targets="Class pybindgen.typehandlers.base.DeclarationsScope=pybindgen.typehandlers.base.DeclarationsScope-class.html"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-9', 'DeclarationsScope', 'link-9');">DeclarationsScope</a></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Class pybindgen.typehandlers.base.CodeBlock=pybindgen.typehandlers.base.CodeBlock-class.html"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-10', 'CodeBlock', 'link-10');">CodeBlock</a></tt> </tt>
<a name="L12"></a><tt class="py-lineno">  12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno">  13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-11" class="py-name"><a title="pybindgen.typehandlers" class="py-name" href="#" onclick="return doclink('link-11', 'typehandlers', 'link-0');">typehandlers</a></tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Module pybindgen.typehandlers.codesink=pybindgen.typehandlers.codesink-module.html"><a title="pybindgen.typehandlers.codesink" class="py-name" href="#" onclick="return doclink('link-12', 'codesink', 'link-12');">codesink</a></tt> <tt class="py-keyword">import</tt> <tt id="link-13" class="py-name" targets="Class pybindgen.typehandlers.codesink.NullCodeSink=pybindgen.typehandlers.codesink.NullCodeSink-class.html"><a title="pybindgen.typehandlers.codesink.NullCodeSink" class="py-name" href="#" onclick="return doclink('link-13', 'NullCodeSink', 'link-13');">NullCodeSink</a></tt><tt class="py-op">,</tt> <tt id="link-14" class="py-name" targets="Class pybindgen.typehandlers.codesink.MemoryCodeSink=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-14', 'MemoryCodeSink', 'link-14');">MemoryCodeSink</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno">  14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">  15</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name" targets="Module pybindgen.cppattribute=pybindgen.cppattribute-module.html"><a title="pybindgen.cppattribute" class="py-name" href="#" onclick="return doclink('link-15', 'cppattribute', 'link-15');">cppattribute</a></tt> <tt class="py-keyword">import</tt> <tt id="link-16" class="py-name" targets="Class pybindgen.cppattribute.CppInstanceAttributeGetter=pybindgen.cppattribute.CppInstanceAttributeGetter-class.html"><a title="pybindgen.cppattribute.CppInstanceAttributeGetter" class="py-name" href="#" onclick="return doclink('link-16', 'CppInstanceAttributeGetter', 'link-16');">CppInstanceAttributeGetter</a></tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Class pybindgen.cppattribute.CppInstanceAttributeSetter=pybindgen.cppattribute.CppInstanceAttributeSetter-class.html"><a title="pybindgen.cppattribute.CppInstanceAttributeSetter" class="py-name" href="#" onclick="return doclink('link-17', 'CppInstanceAttributeSetter', 'link-17');">CppInstanceAttributeSetter</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L16"></a><tt class="py-lineno">  16</tt>  <tt class="py-line">    <tt id="link-18" class="py-name" targets="Class pybindgen.cppattribute.CppStaticAttributeGetter=pybindgen.cppattribute.CppStaticAttributeGetter-class.html"><a title="pybindgen.cppattribute.CppStaticAttributeGetter" class="py-name" href="#" onclick="return doclink('link-18', 'CppStaticAttributeGetter', 'link-18');">CppStaticAttributeGetter</a></tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name" targets="Class pybindgen.cppattribute.CppStaticAttributeSetter=pybindgen.cppattribute.CppStaticAttributeSetter-class.html"><a title="pybindgen.cppattribute.CppStaticAttributeSetter" class="py-name" href="#" onclick="return doclink('link-19', 'CppStaticAttributeSetter', 'link-19');">CppStaticAttributeSetter</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L17"></a><tt class="py-lineno">  17</tt>  <tt class="py-line">    <tt id="link-20" class="py-name" targets="Class pybindgen.cppattribute.PyGetSetDef=pybindgen.cppattribute.PyGetSetDef-class.html"><a title="pybindgen.cppattribute.PyGetSetDef" class="py-name" href="#" onclick="return doclink('link-20', 'PyGetSetDef', 'link-20');">PyGetSetDef</a></tt><tt class="py-op">,</tt> <tt id="link-21" class="py-name" targets="Class pybindgen.cppattribute.PyMetaclass=pybindgen.cppattribute.PyMetaclass-class.html"><a title="pybindgen.cppattribute.PyMetaclass" class="py-name" href="#" onclick="return doclink('link-21', 'PyMetaclass', 'link-21');">PyMetaclass</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">  18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno">  19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-22" class="py-name" targets="Module pybindgen.pytypeobject=pybindgen.pytypeobject-module.html"><a title="pybindgen.pytypeobject" class="py-name" href="#" onclick="return doclink('link-22', 'pytypeobject', 'link-22');">pytypeobject</a></tt> <tt class="py-keyword">import</tt> <tt id="link-23" class="py-name" targets="Class pybindgen.pytypeobject.PyTypeObject=pybindgen.pytypeobject.PyTypeObject-class.html"><a title="pybindgen.pytypeobject.PyTypeObject" class="py-name" href="#" onclick="return doclink('link-23', 'PyTypeObject', 'link-23');">PyTypeObject</a></tt><tt class="py-op">,</tt> <tt id="link-24" class="py-name" targets="Class pybindgen.pytypeobject.PyNumberMethods=pybindgen.pytypeobject.PyNumberMethods-class.html"><a title="pybindgen.pytypeobject.PyNumberMethods" class="py-name" href="#" onclick="return doclink('link-24', 'PyNumberMethods', 'link-24');">PyNumberMethods</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name" targets="Class pybindgen.pytypeobject.PySequenceMethods=pybindgen.pytypeobject.PySequenceMethods-class.html"><a title="pybindgen.pytypeobject.PySequenceMethods" class="py-name" href="#" onclick="return doclink('link-25', 'PySequenceMethods', 'link-25');">PySequenceMethods</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">  20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno">  21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-26" class="py-name" targets="Module pybindgen.settings=pybindgen.settings-module.html"><a title="pybindgen.settings" class="py-name" href="#" onclick="return doclink('link-26', 'settings', 'link-26');">settings</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno">  22</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-27" class="py-name" targets="Module pybindgen.utils=pybindgen.utils-module.html"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-27', 'utils', 'link-27');">utils</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno">  23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno">  24</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L25"></a><tt class="py-lineno">  25</tt>  <tt class="py-line">    <tt class="py-name">set</tt> </tt>
<a name="L26"></a><tt class="py-lineno">  26</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
<a name="L27"></a><tt class="py-lineno">  27</tt>  <tt class="py-line">    <tt class="py-keyword">from</tt> <tt class="py-name">sets</tt> <tt class="py-keyword">import</tt> <tt class="py-name">Set</tt> <tt class="py-keyword">as</tt> <tt class="py-name">set</tt> </tt>
<a name="L28"></a><tt class="py-lineno">  28</tt>  <tt class="py-line"> </tt>
<a name="get_python_to_c_converter"></a><div id="get_python_to_c_converter-def"><a name="L29"></a><tt class="py-lineno">  29</tt> <a class="py-toggle" href="#" id="get_python_to_c_converter-toggle" onclick="return toggle('get_python_to_c_converter');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass-module.html#get_python_to_c_converter">get_python_to_c_converter</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">root_module</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_python_to_c_converter-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="get_python_to_c_converter-expanded"><a name="L30"></a><tt class="py-lineno">  30</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name" targets="Class pybindgen.cppclass.CppClass=pybindgen.cppclass.CppClass-class.html"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-28', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno">  31</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method pybindgen.module.Module.generate_python_to_c_type_converter()=pybindgen.module.Module-class.html#generate_python_to_c_type_converter"><a title="pybindgen.module.Module.generate_python_to_c_type_converter" class="py-name" href="#" onclick="return doclink('link-29', 'generate_python_to_c_type_converter', 'link-29');">generate_python_to_c_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">  32</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> </tt>
<a name="L33"></a><tt class="py-lineno">  33</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-30" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-30', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L34"></a><tt class="py-lineno">  34</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="pybindgen.module.Module.generate_python_to_c_type_converter" class="py-name" href="#" onclick="return doclink('link-31', 'generate_python_to_c_type_converter', 'link-29');">generate_python_to_c_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno">  35</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L36"></a><tt class="py-lineno">  36</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-32" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-32', 'Parameter', 'link-2');">Parameter</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno">  37</tt>  <tt class="py-line">        <tt class="py-name">val_return_type</tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-33', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">.</tt><tt id="link-34" class="py-name" targets="Class Method pybindgen.typehandlers.base.Parameter.new()=pybindgen.typehandlers.base.Parameter-class.html#new,Class Method pybindgen.typehandlers.base.ReturnValue.new()=pybindgen.typehandlers.base.ReturnValue-class.html#new"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-34', 'new', 'link-34');">new</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">  38</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="pybindgen.module.Module.generate_python_to_c_type_converter" class="py-name" href="#" onclick="return doclink('link-35', 'generate_python_to_c_type_converter', 'link-29');">generate_python_to_c_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">val_return_type</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">  39</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L40"></a><tt class="py-lineno">  40</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno">  41</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"Don't know how to convert %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">  42</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">val_converter</tt><tt class="py-op">,</tt> <tt class="py-name">val_name</tt> </tt>
</div><a name="L43"></a><tt class="py-lineno">  43</tt>  <tt class="py-line"> </tt>
<a name="get_c_to_python_converter"></a><div id="get_c_to_python_converter-def"><a name="L44"></a><tt class="py-lineno">  44</tt> <a class="py-toggle" href="#" id="get_c_to_python_converter-toggle" onclick="return toggle('get_c_to_python_converter');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass-module.html#get_c_to_python_converter">get_c_to_python_converter</a><tt class="py-op">(</tt><tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">root_module</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="get_c_to_python_converter-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="get_c_to_python_converter-expanded"><a name="L45"></a><tt class="py-lineno">  45</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-36" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-36', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno">  46</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method pybindgen.module.Module.generate_c_to_python_type_converter()=pybindgen.module.Module-class.html#generate_c_to_python_type_converter"><a title="pybindgen.module.Module.generate_c_to_python_type_converter" class="py-name" href="#" onclick="return doclink('link-37', 'generate_c_to_python_type_converter', 'link-37');">generate_c_to_python_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno">  47</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> </tt>
<a name="L48"></a><tt class="py-lineno">  48</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-38" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-38', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno">  49</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="pybindgen.module.Module.generate_c_to_python_type_converter" class="py-name" href="#" onclick="return doclink('link-39', 'generate_c_to_python_type_converter', 'link-37');">generate_c_to_python_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno">  50</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L51"></a><tt class="py-lineno">  51</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name"><a title="pybindgen.typehandlers.base.Parameter" class="py-name" href="#" onclick="return doclink('link-40', 'Parameter', 'link-2');">Parameter</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno">  52</tt>  <tt class="py-line">        <tt class="py-name">val_return_type</tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-41', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="pybindgen.typehandlers.base.Parameter.new
pybindgen.typehandlers.base.ReturnValue.new" class="py-name" href="#" onclick="return doclink('link-42', 'new', 'link-34');">new</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">  53</tt>  <tt class="py-line">        <tt class="py-name">val_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="pybindgen.module.Module.generate_c_to_python_type_converter" class="py-name" href="#" onclick="return doclink('link-43', 'generate_c_to_python_type_converter', 'link-37');">generate_c_to_python_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">val_return_type</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno">  54</tt>  <tt class="py-line">        <tt class="py-name">val_name</tt> <tt class="py-op">=</tt> <tt class="py-name">value</tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> </tt>
<a name="L55"></a><tt class="py-lineno">  55</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L56"></a><tt class="py-lineno">  56</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"Don't know how to convert %s"</tt> <tt class="py-op">%</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno">  57</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">val_converter</tt><tt class="py-op">,</tt> <tt class="py-name">val_name</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno">  58</tt>  <tt class="py-line"> </tt>
<a name="MemoryPolicy"></a><div id="MemoryPolicy-def"><a name="L59"></a><tt class="py-lineno">  59</tt> <a class="py-toggle" href="#" id="MemoryPolicy-toggle" onclick="return toggle('MemoryPolicy');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.MemoryPolicy-class.html">MemoryPolicy</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MemoryPolicy-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="MemoryPolicy-expanded"><a name="L60"></a><tt class="py-lineno">  60</tt>  <tt class="py-line">    <tt class="py-docstring">"""memory management policy for a C++ class or C/C++ struct"""</tt> </tt>
<a name="MemoryPolicy.__init__"></a><div id="MemoryPolicy.__init__-def"><a name="L61"></a><tt class="py-lineno">  61</tt> <a class="py-toggle" href="#" id="MemoryPolicy.__init__-toggle" onclick="return toggle('MemoryPolicy.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.MemoryPolicy-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MemoryPolicy.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MemoryPolicy.__init__-expanded"><a name="L62"></a><tt class="py-lineno">  62</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt id="link-44" class="py-name" targets="Class pybindgen.cppclass.MemoryPolicy=pybindgen.cppclass.MemoryPolicy-class.html"><a title="pybindgen.cppclass.MemoryPolicy" class="py-name" href="#" onclick="return doclink('link-44', 'MemoryPolicy', 'link-44');">MemoryPolicy</a></tt><tt class="py-op">:</tt> </tt>
<a name="L63"></a><tt class="py-lineno">  63</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt><tt class="py-op">(</tt><tt class="py-string">"class is abstract"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L64"></a><tt class="py-lineno">  64</tt>  <tt class="py-line"> </tt>
<a name="MemoryPolicy.get_free_code"></a><div id="MemoryPolicy.get_free_code-def"><a name="L65"></a><tt class="py-lineno">  65</tt> <a class="py-toggle" href="#" id="MemoryPolicy.get_free_code-toggle" onclick="return toggle('MemoryPolicy.get_free_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.MemoryPolicy-class.html#get_free_code">get_free_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">object_expression</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MemoryPolicy.get_free_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="MemoryPolicy.get_free_code-expanded"><a name="L66"></a><tt class="py-lineno">  66</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L67"></a><tt class="py-lineno">  67</tt>  <tt class="py-line"><tt class="py-docstring">        Return a code statement to free an underlying C/C++ object.</tt> </tt>
<a name="L68"></a><tt class="py-lineno">  68</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L69"></a><tt class="py-lineno">  69</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L70"></a><tt class="py-lineno">  70</tt>  <tt class="py-line"> </tt>
<a name="L71"></a><tt class="py-lineno">  71</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingPolicy"></a><div id="ReferenceCountingPolicy-def"><a name="L72"></a><tt class="py-lineno">  72</tt> <a class="py-toggle" href="#" id="ReferenceCountingPolicy-toggle" onclick="return toggle('ReferenceCountingPolicy');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingPolicy-class.html">ReferenceCountingPolicy</a><tt class="py-op">(</tt><tt class="py-base-class">MemoryPolicy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingPolicy-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ReferenceCountingPolicy-expanded"><a name="ReferenceCountingPolicy.write_incref"></a><div id="ReferenceCountingPolicy.write_incref-def"><a name="L73"></a><tt class="py-lineno">  73</tt> <a class="py-toggle" href="#" id="ReferenceCountingPolicy.write_incref-toggle" onclick="return toggle('ReferenceCountingPolicy.write_incref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingPolicy-class.html#write_incref">write_incref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingPolicy.write_incref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingPolicy.write_incref-expanded"><a name="L74"></a><tt class="py-lineno">  74</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L75"></a><tt class="py-lineno">  75</tt>  <tt class="py-line"><tt class="py-docstring">        Write code to increase the reference code of an object of this</tt> </tt>
<a name="L76"></a><tt class="py-lineno">  76</tt>  <tt class="py-line"><tt class="py-docstring">        class (the real C++ class, not the wrapper).  Should only be</tt> </tt>
<a name="L77"></a><tt class="py-lineno">  77</tt>  <tt class="py-line"><tt class="py-docstring">        called if the class supports reference counting, as reported</tt> </tt>
<a name="L78"></a><tt class="py-lineno">  78</tt>  <tt class="py-line"><tt class="py-docstring">        by the attribute `has_reference_counting'.</tt> </tt>
<a name="L79"></a><tt class="py-lineno">  79</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L80"></a><tt class="py-lineno">  80</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div><a name="L81"></a><tt class="py-lineno">  81</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingPolicy.write_decref"></a><div id="ReferenceCountingPolicy.write_decref-def"><a name="L82"></a><tt class="py-lineno">  82</tt> <a class="py-toggle" href="#" id="ReferenceCountingPolicy.write_decref-toggle" onclick="return toggle('ReferenceCountingPolicy.write_decref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingPolicy-class.html#write_decref">write_decref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingPolicy.write_decref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingPolicy.write_decref-expanded"><a name="L83"></a><tt class="py-lineno">  83</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L84"></a><tt class="py-lineno">  84</tt>  <tt class="py-line"><tt class="py-docstring">        Write code to decrease the reference code of an object of this</tt> </tt>
<a name="L85"></a><tt class="py-lineno">  85</tt>  <tt class="py-line"><tt class="py-docstring">        class (the real C++ class, not the wrapper).  Should only be</tt> </tt>
<a name="L86"></a><tt class="py-lineno">  86</tt>  <tt class="py-line"><tt class="py-docstring">        called if the class supports reference counting, as reported</tt> </tt>
<a name="L87"></a><tt class="py-lineno">  87</tt>  <tt class="py-line"><tt class="py-docstring">        by the attribute `has_reference_counting'.</tt> </tt>
<a name="L88"></a><tt class="py-lineno">  88</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L89"></a><tt class="py-lineno">  89</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">NotImplementedError</tt> </tt>
</div></div><a name="L90"></a><tt class="py-lineno">  90</tt>  <tt class="py-line"> </tt>
<a name="L91"></a><tt class="py-lineno">  91</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingMethodsPolicy"></a><div id="ReferenceCountingMethodsPolicy-def"><a name="L92"></a><tt class="py-lineno">  92</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html">ReferenceCountingMethodsPolicy</a><tt class="py-op">(</tt><tt class="py-base-class">ReferenceCountingPolicy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ReferenceCountingMethodsPolicy-expanded"><a name="ReferenceCountingMethodsPolicy.__init__"></a><div id="ReferenceCountingMethodsPolicy.__init__-def"><a name="L93"></a><tt class="py-lineno">  93</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy.__init__-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">incref_method</tt><tt class="py-op">,</tt> <tt class="py-param">decref_method</tt><tt class="py-op">,</tt> <tt class="py-param">peekref_method</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingMethodsPolicy.__init__-expanded"><a name="L94"></a><tt class="py-lineno">  94</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-45" class="py-name" targets="Class pybindgen.cppclass.ReferenceCountingMethodsPolicy=pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html"><a title="pybindgen.cppclass.ReferenceCountingMethodsPolicy" class="py-name" href="#" onclick="return doclink('link-45', 'ReferenceCountingMethodsPolicy', 'link-45');">ReferenceCountingMethodsPolicy</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Method pybindgen.container.Container.__init__()=pybindgen.container.Container-class.html#__init__,Method pybindgen.container.ContainerParameterBase.__init__()=pybindgen.container.ContainerParameterBase-class.html#__init__,Method pybindgen.container.ContainerPtrParameter.__init__()=pybindgen.container.ContainerPtrParameter-class.html#__init__,Method pybindgen.container.ContainerReturnValue.__init__()=pybindgen.container.ContainerReturnValue-class.html#__init__,Method pybindgen.container.ContainerReturnValueBase.__init__()=pybindgen.container.ContainerReturnValueBase-class.html#__init__,Method pybindgen.container.ContainerTraits.__init__()=pybindgen.container.ContainerTraits-class.html#__init__,Method pybindgen.container.IterNextWrapper.__init__()=pybindgen.container.IterNextWrapper-class.html#__init__,Method pybindgen.converter_functions.CToPythonConverter.__init__()=pybindgen.converter_functions.CToPythonConverter-class.html#__init__,Method pybindgen.converter_functions.PythonToCConverter.__init__()=pybindgen.converter_functions.PythonToCConverter-class.html#__init__,Method pybindgen.cppattribute.CppInstanceAttributeGetter.__init__()=pybindgen.cppattribute.CppInstanceAttributeGetter-class.html#__init__,Method pybindgen.cppattribute.CppInstanceAttributeSetter.__init__()=pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#__init__,Method pybindgen.cppattribute.CppStaticAttributeGetter.__init__()=pybindgen.cppattribute.CppStaticAttributeGetter-class.html#__init__,Method pybindgen.cppattribute.CppStaticAttributeSetter.__init__()=pybindgen.cppattribute.CppStaticAttributeSetter-class.html#__init__,Method pybindgen.cppattribute.PyGetSetDef.__init__()=pybindgen.cppattribute.PyGetSetDef-class.html#__init__,Method pybindgen.cppattribute.PyMetaclass.__init__()=pybindgen.cppattribute.PyMetaclass-class.html#__init__,Method pybindgen.cppclass.CppClass.__init__()=pybindgen.cppclass.CppClass-class.html#__init__,Method pybindgen.cppclass.CppHelperClass.__init__()=pybindgen.cppclass.CppHelperClass-class.html#__init__,Method pybindgen.cppclass.FreeFunctionPolicy.__init__()=pybindgen.cppclass.FreeFunctionPolicy-class.html#__init__,Method pybindgen.cppclass.MemoryPolicy.__init__()=pybindgen.cppclass.MemoryPolicy-class.html#__init__,Method pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__()=pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#__init__,Method pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__()=pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__()=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__()=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__()=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__()=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__()=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#__init__,Method pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__()=pybindgen.cppclass_typehandlers.CppClassReturnValueBase-class.html#__init__,Method pybindgen.cppmethod.CppConstructor.__init__()=pybindgen.cppmethod.CppConstructor-class.html#__init__,Method pybindgen.cppmethod.CppDummyMethod.__init__()=pybindgen.cppmethod.CppDummyMethod-class.html#__init__,Method pybindgen.cppmethod.CppFunctionAsConstructor.__init__()=pybindgen.cppmethod.CppFunctionAsConstructor-class.html#__init__,Method pybindgen.cppmethod.CppMethod.__init__()=pybindgen.cppmethod.CppMethod-class.html#__init__,Method pybindgen.cppmethod.CppNoConstructor.__init__()=pybindgen.cppmethod.CppNoConstructor-class.html#__init__,Method pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#__init__,Method pybindgen.cppmethod.CppVirtualMethodProxy.__init__()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#__init__,Method pybindgen.cppmethod.CustomCppConstructorWrapper.__init__()=pybindgen.cppmethod.CustomCppConstructorWrapper-class.html#__init__,Method pybindgen.cppmethod.CustomCppMethodWrapper.__init__()=pybindgen.cppmethod.CustomCppMethodWrapper-class.html#__init__,Method pybindgen.cppmethod.DummyParameter.__init__()=pybindgen.cppmethod.DummyParameter-class.html#__init__,Method pybindgen.cppmethod.DummyReturnValue.__init__()=pybindgen.cppmethod.DummyReturnValue-class.html#__init__,Method pybindgen.enum.Enum.__init__()=pybindgen.enum.Enum-class.html#__init__,Method pybindgen.function.CustomFunctionWrapper.__init__()=pybindgen.function.CustomFunctionWrapper-class.html#__init__,Method pybindgen.function.Function.__init__()=pybindgen.function.Function-class.html#__init__,Method pybindgen.gccxmlparser.AnnotationsScanner.__init__()=pybindgen.gccxmlparser.AnnotationsScanner-class.html#__init__,Method pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__()=pybindgen.gccxmlparser.GccXmlTypeRegistry-class.html#__init__,Method pybindgen.gccxmlparser.ModuleParser.__init__()=pybindgen.gccxmlparser.ModuleParser-class.html#__init__,Method pybindgen.gccxmlparser.PygenSection.__init__()=pybindgen.gccxmlparser.PygenSection-class.html#__init__,Method pybindgen.module.Module.__init__()=pybindgen.module.Module-class.html#__init__,Method pybindgen.module.ModuleBase.__init__()=pybindgen.module.ModuleBase-class.html#__init__,Method pybindgen.module.SubModule.__init__()=pybindgen.module.SubModule-class.html#__init__,Method pybindgen.overloading.OverloadedWrapper.__init__()=pybindgen.overloading.OverloadedWrapper-class.html#__init__,Method pybindgen.pytypeobject.PyNumberMethods.__init__()=pybindgen.pytypeobject.PyNumberMethods-class.html#__init__,Method pybindgen.pytypeobject.PySequenceMethods.__init__()=pybindgen.pytypeobject.PySequenceMethods-class.html#__init__,Method pybindgen.pytypeobject.PyTypeObject.__init__()=pybindgen.pytypeobject.PyTypeObject-class.html#__init__,Method pybindgen.typehandlers.base.BuildValueParameters.__init__()=pybindgen.typehandlers.base.BuildValueParameters-class.html#__init__,Method pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__()=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#__init__,Method pybindgen.typehandlers.base.CodeBlock.__init__()=pybindgen.typehandlers.base.CodeBlock-class.html#__init__,Method pybindgen.typehandlers.base.DeclarationsScope.__init__()=pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__,Method pybindgen.typehandlers.base.ForwardWrapperBase.__init__()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__,Method pybindgen.typehandlers.base.Parameter.__init__()=pybindgen.typehandlers.base.Parameter-class.html#__init__,Method pybindgen.typehandlers.base.Parameter.__metaclass__.__init__()=pybindgen.typehandlers.base.Parameter.__metaclass__-class.html#__init__,Method pybindgen.typehandlers.base.ParseTupleParameters.__init__()=pybindgen.typehandlers.base.ParseTupleParameters-class.html#__init__,Method pybindgen.typehandlers.base.PointerParameter.__init__()=pybindgen.typehandlers.base.PointerParameter-class.html#__init__,Method pybindgen.typehandlers.base.PointerReturnValue.__init__()=pybindgen.typehandlers.base.PointerReturnValue-class.html#__init__,Method pybindgen.typehandlers.base.ReturnValue.__init__()=pybindgen.typehandlers.base.ReturnValue-class.html#__init__,Method pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__()=pybindgen.typehandlers.base.ReturnValue.__metaclass__-class.html#__init__,Method pybindgen.typehandlers.base.ReverseWrapperBase.__init__()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#__init__,Method pybindgen.typehandlers.base.TypeHandler.__init__()=pybindgen.typehandlers.base.TypeHandler-class.html#__init__,Method pybindgen.typehandlers.base.TypeMatcher.__init__()=pybindgen.typehandlers.base.TypeMatcher-class.html#__init__,Method pybindgen.typehandlers.codesink.CodeSink.__init__()=pybindgen.typehandlers.codesink.CodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.FileCodeSink.__init__()=pybindgen.typehandlers.codesink.FileCodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.MemoryCodeSink.__init__()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#__init__,Method pybindgen.typehandlers.codesink.NullCodeSink.__init__()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.CType.__init__()=pybindgen.typehandlers.ctypeparser.CType-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.TypeTraits.__init__()=pybindgen.typehandlers.ctypeparser.TypeTraits-class.html#__init__,Method pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__()=pybindgen.typehandlers.ctypeparser.tokenizer.Token-class.html#__init__,Method pybindgen.typehandlers.floattype.FloatPtrParam.__init__()=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.Int8PtrParam.__init__()=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.IntPtrParam.__init__()=pybindgen.typehandlers.inttype.IntPtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.UInt8PtrParam.__init__()=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#__init__,Method pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__()=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#__init__,Method pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__()=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#__init__,Method pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__()=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#__init__,Method pybindgen.wrapper_registry.NullWrapperRegistry.__init__()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#__init__,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#__init__,Method pybindgen.wrapper_registry.WrapperRegistry.__init__()=pybindgen.wrapper_registry.WrapperRegistry-class.html#__init__"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-46', '__init__', 'link-46');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno">  95</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_method</tt> <tt class="py-op">=</tt> <tt class="py-name">incref_method</tt> </tt>
<a name="L96"></a><tt class="py-lineno">  96</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_method</tt> <tt class="py-op">=</tt> <tt class="py-name">decref_method</tt> </tt>
<a name="L97"></a><tt class="py-lineno">  97</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">peekref_method</tt> <tt class="py-op">=</tt> <tt class="py-name">peekref_method</tt> </tt>
</div><a name="L98"></a><tt class="py-lineno">  98</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingMethodsPolicy.write_incref"></a><div id="ReferenceCountingMethodsPolicy.write_incref-def"><a name="L99"></a><tt class="py-lineno">  99</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy.write_incref-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy.write_incref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#write_incref">write_incref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy.write_incref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingMethodsPolicy.write_incref-expanded"><a name="L100"></a><tt class="py-lineno"> 100</tt>  <tt class="py-line">        <tt id="link-47" class="py-name" targets="Variable pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block=pybindgen.typehandlers.base.CodeBlock.CleanupHandle-class.html#code_block"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-47', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_code()=pybindgen.typehandlers.base.CodeBlock-class.html#write_code"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-48', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s-&gt;%s();'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">obj_expr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_method</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L101"></a><tt class="py-lineno"> 101</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingMethodsPolicy.write_decref"></a><div id="ReferenceCountingMethodsPolicy.write_decref-def"><a name="L102"></a><tt class="py-lineno"> 102</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy.write_decref-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy.write_decref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#write_decref">write_decref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy.write_decref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingMethodsPolicy.write_decref-expanded"><a name="L103"></a><tt class="py-lineno"> 103</tt>  <tt class="py-line">        <tt id="link-49" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-49', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-50', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s-&gt;%s();'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">obj_expr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_method</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L104"></a><tt class="py-lineno"> 104</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingMethodsPolicy.get_free_code"></a><div id="ReferenceCountingMethodsPolicy.get_free_code-def"><a name="L105"></a><tt class="py-lineno"> 105</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy.get_free_code-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy.get_free_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#get_free_code">get_free_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy.get_free_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingMethodsPolicy.get_free_code-expanded"><a name="L106"></a><tt class="py-lineno"> 106</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">'%s-&gt;%s();'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">obj_expr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_method</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L107"></a><tt class="py-lineno"> 107</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingMethodsPolicy.__repr__"></a><div id="ReferenceCountingMethodsPolicy.__repr__-def"><a name="L108"></a><tt class="py-lineno"> 108</tt> <a class="py-toggle" href="#" id="ReferenceCountingMethodsPolicy.__repr__-toggle" onclick="return toggle('ReferenceCountingMethodsPolicy.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingMethodsPolicy.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingMethodsPolicy.__repr__-expanded"><a name="L109"></a><tt class="py-lineno"> 109</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'cppclass.ReferenceCountingMethodsPolicy(incref_method=%r, decref_method=%r, peekref_method=%r)'</tt> \ </tt>
<a name="L110"></a><tt class="py-lineno"> 110</tt>  <tt class="py-line">            <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_method</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_method</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">peekref_method</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L111"></a><tt class="py-lineno"> 111</tt>  <tt class="py-line"> </tt>
<a name="L112"></a><tt class="py-lineno"> 112</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingFunctionsPolicy"></a><div id="ReferenceCountingFunctionsPolicy-def"><a name="L113"></a><tt class="py-lineno"> 113</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html">ReferenceCountingFunctionsPolicy</a><tt class="py-op">(</tt><tt class="py-base-class">ReferenceCountingPolicy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="ReferenceCountingFunctionsPolicy-expanded"><a name="ReferenceCountingFunctionsPolicy.__init__"></a><div id="ReferenceCountingFunctionsPolicy.__init__-def"><a name="L114"></a><tt class="py-lineno"> 114</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy.__init__-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">incref_function</tt><tt class="py-op">,</tt> <tt class="py-param">decref_function</tt><tt class="py-op">,</tt> <tt class="py-param">peekref_function</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingFunctionsPolicy.__init__-expanded"><a name="L115"></a><tt class="py-lineno"> 115</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-51" class="py-name" targets="Class pybindgen.cppclass.ReferenceCountingFunctionsPolicy=pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html"><a title="pybindgen.cppclass.ReferenceCountingFunctionsPolicy" class="py-name" href="#" onclick="return doclink('link-51', 'ReferenceCountingFunctionsPolicy', 'link-51');">ReferenceCountingFunctionsPolicy</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-52', '__init__', 'link-46');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno"> 116</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_function</tt> <tt class="py-op">=</tt> <tt class="py-name">incref_function</tt> </tt>
<a name="L117"></a><tt class="py-lineno"> 117</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_function</tt> <tt class="py-op">=</tt> <tt class="py-name">decref_function</tt> </tt>
<a name="L118"></a><tt class="py-lineno"> 118</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">peekref_function</tt> <tt class="py-op">=</tt> <tt class="py-name">peekref_function</tt> </tt>
</div><a name="L119"></a><tt class="py-lineno"> 119</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingFunctionsPolicy.write_incref"></a><div id="ReferenceCountingFunctionsPolicy.write_incref-def"><a name="L120"></a><tt class="py-lineno"> 120</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy.write_incref-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy.write_incref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#write_incref">write_incref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy.write_incref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingFunctionsPolicy.write_incref-expanded"><a name="L121"></a><tt class="py-lineno"> 121</tt>  <tt class="py-line">        <tt id="link-53" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-53', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-54', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s(%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_function</tt><tt class="py-op">,</tt> <tt class="py-name">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L122"></a><tt class="py-lineno"> 122</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingFunctionsPolicy.write_decref"></a><div id="ReferenceCountingFunctionsPolicy.write_decref-def"><a name="L123"></a><tt class="py-lineno"> 123</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy.write_decref-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy.write_decref');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#write_decref">write_decref</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy.write_decref-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingFunctionsPolicy.write_decref-expanded"><a name="L124"></a><tt class="py-lineno"> 124</tt>  <tt class="py-line">        <tt id="link-55" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-55', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-56', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s(%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_function</tt><tt class="py-op">,</tt> <tt class="py-name">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L125"></a><tt class="py-lineno"> 125</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingFunctionsPolicy.get_free_code"></a><div id="ReferenceCountingFunctionsPolicy.get_free_code-def"><a name="L126"></a><tt class="py-lineno"> 126</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy.get_free_code-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy.get_free_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#get_free_code">get_free_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy.get_free_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingFunctionsPolicy.get_free_code-expanded"><a name="L127"></a><tt class="py-lineno"> 127</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">'%s(%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">obj_expr</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_function</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L128"></a><tt class="py-lineno"> 128</tt>  <tt class="py-line"> </tt>
<a name="ReferenceCountingFunctionsPolicy.__repr__"></a><div id="ReferenceCountingFunctionsPolicy.__repr__-def"><a name="L129"></a><tt class="py-lineno"> 129</tt> <a class="py-toggle" href="#" id="ReferenceCountingFunctionsPolicy.__repr__-toggle" onclick="return toggle('ReferenceCountingFunctionsPolicy.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ReferenceCountingFunctionsPolicy.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="ReferenceCountingFunctionsPolicy.__repr__-expanded"><a name="L130"></a><tt class="py-lineno"> 130</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'cppclass.ReferenceCountingFunctionsPolicy(incref_function=%r, decref_function=%r, peekref_function=%r)'</tt> \ </tt>
<a name="L131"></a><tt class="py-lineno"> 131</tt>  <tt class="py-line">            <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incref_function</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decref_function</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">peekref_function</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L132"></a><tt class="py-lineno"> 132</tt>  <tt class="py-line"> </tt>
<a name="FreeFunctionPolicy"></a><div id="FreeFunctionPolicy-def"><a name="L133"></a><tt class="py-lineno"> 133</tt> <a class="py-toggle" href="#" id="FreeFunctionPolicy-toggle" onclick="return toggle('FreeFunctionPolicy');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.FreeFunctionPolicy-class.html">FreeFunctionPolicy</a><tt class="py-op">(</tt><tt class="py-base-class">MemoryPolicy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FreeFunctionPolicy-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="FreeFunctionPolicy-expanded"><a name="FreeFunctionPolicy.__init__"></a><div id="FreeFunctionPolicy.__init__-def"><a name="L134"></a><tt class="py-lineno"> 134</tt> <a class="py-toggle" href="#" id="FreeFunctionPolicy.__init__-toggle" onclick="return toggle('FreeFunctionPolicy.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.FreeFunctionPolicy-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">free_function</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FreeFunctionPolicy.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FreeFunctionPolicy.__init__-expanded"><a name="L135"></a><tt class="py-lineno"> 135</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-57" class="py-name" targets="Class pybindgen.cppclass.FreeFunctionPolicy=pybindgen.cppclass.FreeFunctionPolicy-class.html"><a title="pybindgen.cppclass.FreeFunctionPolicy" class="py-name" href="#" onclick="return doclink('link-57', 'FreeFunctionPolicy', 'link-57');">FreeFunctionPolicy</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="pybindgen.container.Container.__init__
pybindgen.container.ContainerParameterBase.__init__
pybindgen.container.ContainerPtrParameter.__init__
pybindgen.container.ContainerReturnValue.__init__
pybindgen.container.ContainerReturnValueBase.__init__
pybindgen.container.ContainerTraits.__init__
pybindgen.container.IterNextWrapper.__init__
pybindgen.converter_functions.CToPythonConverter.__init__
pybindgen.converter_functions.PythonToCConverter.__init__
pybindgen.cppattribute.CppInstanceAttributeGetter.__init__
pybindgen.cppattribute.CppInstanceAttributeSetter.__init__
pybindgen.cppattribute.CppStaticAttributeGetter.__init__
pybindgen.cppattribute.CppStaticAttributeSetter.__init__
pybindgen.cppattribute.PyGetSetDef.__init__
pybindgen.cppattribute.PyMetaclass.__init__
pybindgen.cppclass.CppClass.__init__
pybindgen.cppclass.CppHelperClass.__init__
pybindgen.cppclass.FreeFunctionPolicy.__init__
pybindgen.cppclass.MemoryPolicy.__init__
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.__init__
pybindgen.cppclass.ReferenceCountingMethodsPolicy.__init__
pybindgen.cppclass_typehandlers.CppClassParameterBase.__init__
pybindgen.cppclass_typehandlers.CppClassPtrParameter.__init__
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassRefParameter.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValue.__init__
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.__init__
pybindgen.cppmethod.CppConstructor.__init__
pybindgen.cppmethod.CppDummyMethod.__init__
pybindgen.cppmethod.CppFunctionAsConstructor.__init__
pybindgen.cppmethod.CppMethod.__init__
pybindgen.cppmethod.CppNoConstructor.__init__
pybindgen.cppmethod.CppVirtualMethodParentCaller.__init__
pybindgen.cppmethod.CppVirtualMethodProxy.__init__
pybindgen.cppmethod.CustomCppConstructorWrapper.__init__
pybindgen.cppmethod.CustomCppMethodWrapper.__init__
pybindgen.cppmethod.DummyParameter.__init__
pybindgen.cppmethod.DummyReturnValue.__init__
pybindgen.enum.Enum.__init__
pybindgen.function.CustomFunctionWrapper.__init__
pybindgen.function.Function.__init__
pybindgen.gccxmlparser.AnnotationsScanner.__init__
pybindgen.gccxmlparser.GccXmlTypeRegistry.__init__
pybindgen.gccxmlparser.ModuleParser.__init__
pybindgen.gccxmlparser.PygenSection.__init__
pybindgen.module.Module.__init__
pybindgen.module.ModuleBase.__init__
pybindgen.module.SubModule.__init__
pybindgen.overloading.OverloadedWrapper.__init__
pybindgen.pytypeobject.PyNumberMethods.__init__
pybindgen.pytypeobject.PySequenceMethods.__init__
pybindgen.pytypeobject.PyTypeObject.__init__
pybindgen.typehandlers.base.BuildValueParameters.__init__
pybindgen.typehandlers.base.CodeBlock.CleanupHandle.__init__
pybindgen.typehandlers.base.CodeBlock.__init__
pybindgen.typehandlers.base.DeclarationsScope.__init__
pybindgen.typehandlers.base.ForwardWrapperBase.__init__
pybindgen.typehandlers.base.Parameter.__init__
pybindgen.typehandlers.base.Parameter.__metaclass__.__init__
pybindgen.typehandlers.base.ParseTupleParameters.__init__
pybindgen.typehandlers.base.PointerParameter.__init__
pybindgen.typehandlers.base.PointerReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__init__
pybindgen.typehandlers.base.ReturnValue.__metaclass__.__init__
pybindgen.typehandlers.base.ReverseWrapperBase.__init__
pybindgen.typehandlers.base.TypeHandler.__init__
pybindgen.typehandlers.base.TypeMatcher.__init__
pybindgen.typehandlers.codesink.CodeSink.__init__
pybindgen.typehandlers.codesink.FileCodeSink.__init__
pybindgen.typehandlers.codesink.MemoryCodeSink.__init__
pybindgen.typehandlers.codesink.NullCodeSink.__init__
pybindgen.typehandlers.ctypeparser.CType.__init__
pybindgen.typehandlers.ctypeparser.TypeTraits.__init__
pybindgen.typehandlers.ctypeparser.tokenizer.Token.__init__
pybindgen.typehandlers.floattype.FloatPtrParam.__init__
pybindgen.typehandlers.inttype.Int8PtrParam.__init__
pybindgen.typehandlers.inttype.IntPtrParam.__init__
pybindgen.typehandlers.inttype.UInt8PtrParam.__init__
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectParam.__init__
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.__init__
pybindgen.wrapper_registry.NullWrapperRegistry.__init__
pybindgen.wrapper_registry.StdMapWrapperRegistry.__init__
pybindgen.wrapper_registry.WrapperRegistry.__init__" class="py-name" href="#" onclick="return doclink('link-58', '__init__', 'link-46');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L136"></a><tt class="py-lineno"> 136</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">free_function</tt> <tt class="py-op">=</tt> <tt class="py-name">free_function</tt> </tt>
</div><a name="L137"></a><tt class="py-lineno"> 137</tt>  <tt class="py-line"> </tt>
<a name="FreeFunctionPolicy.get_free_code"></a><div id="FreeFunctionPolicy.get_free_code-def"><a name="L138"></a><tt class="py-lineno"> 138</tt> <a class="py-toggle" href="#" id="FreeFunctionPolicy.get_free_code-toggle" onclick="return toggle('FreeFunctionPolicy.get_free_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.FreeFunctionPolicy-class.html#get_free_code">get_free_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FreeFunctionPolicy.get_free_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FreeFunctionPolicy.get_free_code-expanded"><a name="L139"></a><tt class="py-lineno"> 139</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-string">'%s(%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">free_function</tt><tt class="py-op">,</tt> <tt class="py-name">obj_expr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L140"></a><tt class="py-lineno"> 140</tt>  <tt class="py-line"> </tt>
<a name="FreeFunctionPolicy.__repr__"></a><div id="FreeFunctionPolicy.__repr__-def"><a name="L141"></a><tt class="py-lineno"> 141</tt> <a class="py-toggle" href="#" id="FreeFunctionPolicy.__repr__-toggle" onclick="return toggle('FreeFunctionPolicy.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.FreeFunctionPolicy-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FreeFunctionPolicy.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="FreeFunctionPolicy.__repr__-expanded"><a name="L142"></a><tt class="py-lineno"> 142</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'cppclass.FreeFunctionPolicy(%r)'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">free_function</tt> </tt>
</div></div><a name="L143"></a><tt class="py-lineno"> 143</tt>  <tt class="py-line"> </tt>
<a name="L144"></a><tt class="py-lineno"> 144</tt>  <tt class="py-line"> </tt>
<a name="default_instance_creation_function"></a><div id="default_instance_creation_function-def"><a name="L145"></a><tt class="py-lineno"> 145</tt> <a class="py-toggle" href="#" id="default_instance_creation_function-toggle" onclick="return toggle('default_instance_creation_function');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass-module.html#default_instance_creation_function">default_instance_creation_function</a><tt class="py-op">(</tt><tt class="py-param">cpp_class</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">lvalue</tt><tt class="py-op">,</tt> </tt>
<a name="L146"></a><tt class="py-lineno"> 146</tt>  <tt class="py-line">                                       <tt class="py-param">parameters</tt><tt class="py-op">,</tt> <tt class="py-param">construct_type_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="default_instance_creation_function-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="default_instance_creation_function-expanded"><a name="L147"></a><tt class="py-lineno"> 147</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L148"></a><tt class="py-lineno"> 148</tt>  <tt class="py-line"><tt class="py-docstring">    Default "instance creation function"; it is called whenever a new</tt> </tt>
<a name="L149"></a><tt class="py-lineno"> 149</tt>  <tt class="py-line"><tt class="py-docstring">    C++ class instance needs to be created; this default</tt> </tt>
<a name="L150"></a><tt class="py-lineno"> 150</tt>  <tt class="py-line"><tt class="py-docstring">    implementation uses a standard C++ new allocator.</tt> </tt>
<a name="L151"></a><tt class="py-lineno"> 151</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L152"></a><tt class="py-lineno"> 152</tt>  <tt class="py-line"><tt class="py-docstring">    @param cpp_class: the CppClass object whose instance is to be created</tt> </tt>
<a name="L153"></a><tt class="py-lineno"> 153</tt>  <tt class="py-line"><tt class="py-docstring">    @param code_block: CodeBlock object on which the instance creation code should be generated</tt> </tt>
<a name="L154"></a><tt class="py-lineno"> 154</tt>  <tt class="py-line"><tt class="py-docstring">    @param lvalue: lvalue expression that should hold the result in the end</tt> </tt>
<a name="L155"></a><tt class="py-lineno"> 155</tt>  <tt class="py-line"><tt class="py-docstring">    @param parameters: stringified list of parameters</tt> </tt>
<a name="L156"></a><tt class="py-lineno"> 156</tt>  <tt class="py-line"><tt class="py-docstring">    @param construct_type_name: actual name of type to be constructed (it is</tt> </tt>
<a name="L157"></a><tt class="py-lineno"> 157</tt>  <tt class="py-line"><tt class="py-docstring">                          not always the class name, sometimes it's</tt> </tt>
<a name="L158"></a><tt class="py-lineno"> 158</tt>  <tt class="py-line"><tt class="py-docstring">                          the python helper class)</tt> </tt>
<a name="L159"></a><tt class="py-lineno"> 159</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L160"></a><tt class="py-lineno"> 160</tt>  <tt class="py-line">    <tt class="py-keyword">assert</tt> <tt class="py-name">lvalue</tt> </tt>
<a name="L161"></a><tt class="py-lineno"> 161</tt>  <tt class="py-line">    <tt class="py-keyword">assert</tt> <tt class="py-keyword">not</tt> <tt class="py-name">lvalue</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'None'</tt><tt class="py-op">)</tt> </tt>
<a name="L162"></a><tt class="py-lineno"> 162</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-59" class="py-name" targets="Variable pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#cpp_class,Variable pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class=pybindgen.cppclass_typehandlers.CppClassReturnValueBase-class.html#cpp_class"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-59', 'cpp_class', 'link-59');">cpp_class</a></tt><tt class="py-op">.</tt><tt class="py-name">incomplete_type</tt><tt class="py-op">:</tt> </tt>
<a name="L163"></a><tt class="py-lineno"> 163</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt id="link-60" class="py-name"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-60', 'CodeGenerationError', 'link-5');">CodeGenerationError</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s cannot be constructed (incomplete type)"</tt> </tt>
<a name="L164"></a><tt class="py-lineno"> 164</tt>  <tt class="py-line">                                  <tt class="py-op">%</tt> <tt id="link-61" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-61', 'cpp_class', 'link-59');">cpp_class</a></tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L165"></a><tt class="py-lineno"> 165</tt>  <tt class="py-line">    <tt id="link-62" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-62', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-63', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L166"></a><tt class="py-lineno"> 166</tt>  <tt class="py-line">        <tt class="py-string">"%s = new %s(%s);"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">lvalue</tt><tt class="py-op">,</tt> <tt class="py-name">construct_type_name</tt><tt class="py-op">,</tt> <tt class="py-name">parameters</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L167"></a><tt class="py-lineno"> 167</tt>  <tt class="py-line"> </tt>
<a name="L168"></a><tt class="py-lineno"> 168</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass"></a><div id="CppHelperClass-def"><a name="L169"></a><tt class="py-lineno"> 169</tt> <a class="py-toggle" href="#" id="CppHelperClass-toggle" onclick="return toggle('CppHelperClass');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html">CppHelperClass</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CppHelperClass-expanded"><a name="L170"></a><tt class="py-lineno"> 170</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L171"></a><tt class="py-lineno"> 171</tt>  <tt class="py-line"><tt class="py-docstring">    Generates code for a C++ proxy subclass that takes care of</tt> </tt>
<a name="L172"></a><tt class="py-lineno"> 172</tt>  <tt class="py-line"><tt class="py-docstring">    forwarding virtual methods from C++ to Python.</tt> </tt>
<a name="L173"></a><tt class="py-lineno"> 173</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L174"></a><tt class="py-lineno"> 174</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.__init__"></a><div id="CppHelperClass.__init__-def"><a name="L175"></a><tt class="py-lineno"> 175</tt> <a class="py-toggle" href="#" id="CppHelperClass.__init__-toggle" onclick="return toggle('CppHelperClass.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">class_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.__init__-expanded"><a name="L176"></a><tt class="py-lineno"> 176</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L177"></a><tt class="py-lineno"> 177</tt>  <tt class="py-line"><tt class="py-docstring">        class_ -- original CppClass wrapper object</tt> </tt>
<a name="L178"></a><tt class="py-lineno"> 178</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L179"></a><tt class="py-lineno"> 179</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Variable pybindgen.cppmethod.CppConstructor.class_=pybindgen.cppmethod.CppConstructor-class.html#class_,Variable pybindgen.cppmethod.CppMethod.class_=pybindgen.cppmethod.CppMethod-class.html#class_,Variable pybindgen.cppmethod.CppVirtualMethodParentCaller.class_=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#class_,Variable pybindgen.cppmethod.CppVirtualMethodProxy.class_=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#class_"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-64', 'class_', 'link-64');">class_</a></tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-65', 'class_', 'link-64');">class_</a></tt> </tt>
<a name="L180"></a><tt class="py-lineno"> 180</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Variable pybindgen.module.ModuleBase.name=pybindgen.module.ModuleBase-class.html#name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-66', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-67" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-67', 'class_', 'link-64');">class_</a></tt><tt class="py-op">.</tt><tt id="link-68" class="py-name" targets="Variable pybindgen.container.Container.pystruct=pybindgen.container.Container-class.html#pystruct,Variable pybindgen.cppclass.CppClass.pystruct=pybindgen.cppclass.CppClass-class.html#pystruct"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-68', 'pystruct', 'link-68');">pystruct</a></tt> <tt class="py-op">+</tt> <tt class="py-string">"__PythonHelper"</tt> </tt>
<a name="L181"></a><tt class="py-lineno"> 181</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_parent_callers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L182"></a><tt class="py-lineno"> 182</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_proxies</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L183"></a><tt class="py-lineno"> 183</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L184"></a><tt class="py-lineno"> 184</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L185"></a><tt class="py-lineno"> 185</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">post_generation_code</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L186"></a><tt class="py-lineno"> 186</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div><a name="L187"></a><tt class="py-lineno"> 187</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.add_virtual_method"></a><div id="CppHelperClass.add_virtual_method-def"><a name="L188"></a><tt class="py-lineno"> 188</tt> <a class="py-toggle" href="#" id="CppHelperClass.add_virtual_method-toggle" onclick="return toggle('CppHelperClass.add_virtual_method');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#add_virtual_method">add_virtual_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.add_virtual_method-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.add_virtual_method-expanded"><a name="L189"></a><tt class="py-lineno"> 189</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_virtual</tt> </tt>
<a name="L190"></a><tt class="py-lineno"> 190</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-69', 'class_', 'link-64');">class_</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L191"></a><tt class="py-lineno"> 191</tt>  <tt class="py-line"> </tt>
<a name="L192"></a><tt class="py-lineno"> 192</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">existing</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L193"></a><tt class="py-lineno"> 193</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name" targets="Method pybindgen.cppmethod.CppMethod.matches_signature()=pybindgen.cppmethod.CppMethod-class.html#matches_signature"><a title="pybindgen.cppmethod.CppMethod.matches_signature" class="py-name" href="#" onclick="return doclink('link-70', 'matches_signature', 'link-70');">matches_signature</a></tt><tt class="py-op">(</tt><tt class="py-name">existing</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L194"></a><tt class="py-lineno"> 194</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-comment"># don't re-add already existing method</tt> </tt>
<a name="L195"></a><tt class="py-lineno"> 195</tt>  <tt class="py-line">         </tt>
<a name="L196"></a><tt class="py-lineno"> 196</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-71" class="py-name" targets="Class pybindgen.cppmethod.CppDummyMethod=pybindgen.cppmethod.CppDummyMethod-class.html"><a title="pybindgen.cppmethod.CppDummyMethod" class="py-name" href="#" onclick="return doclink('link-71', 'CppDummyMethod', 'link-71');">CppDummyMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L197"></a><tt class="py-lineno"> 197</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno"> 198</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L199"></a><tt class="py-lineno"> 199</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L200"></a><tt class="py-lineno"> 200</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_methods</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L201"></a><tt class="py-lineno"> 201</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L202"></a><tt class="py-lineno"> 202</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'public'</tt><tt class="py-op">,</tt> <tt class="py-string">'protected'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L203"></a><tt class="py-lineno"> 203</tt>  <tt class="py-line">                    <tt class="py-name">parent_caller</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name" targets="Class pybindgen.cppmethod.CppVirtualMethodParentCaller=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller" class="py-name" href="#" onclick="return doclink('link-72', 'CppVirtualMethodParentCaller', 'link-72');">CppVirtualMethodParentCaller</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L204"></a><tt class="py-lineno"> 204</tt>  <tt class="py-line">                    <tt class="py-comment">#parent_caller.class_ = method.class_</tt> </tt>
<a name="L205"></a><tt class="py-lineno"> 205</tt>  <tt class="py-line">                    <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name" targets="Variable pybindgen.cppmethod.CppMethod.helper_class=pybindgen.cppmethod.CppMethod-class.html#helper_class,Variable pybindgen.cppmethod.CppVirtualMethodProxy.helper_class=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#helper_class"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-73', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L206"></a><tt class="py-lineno"> 206</tt>  <tt class="py-line">                    <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt class="py-name">main_wrapper</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt> <tt class="py-comment"># XXX: need to explain this</tt> </tt>
<a name="L207"></a><tt class="py-lineno"> 207</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name" targets="Method pybindgen.cppclass.CppHelperClass.add_virtual_parent_caller()=pybindgen.cppclass.CppHelperClass-class.html#add_virtual_parent_caller"><a title="pybindgen.cppclass.CppHelperClass.add_virtual_parent_caller" class="py-name" href="#" onclick="return doclink('link-74', 'add_virtual_parent_caller', 'link-74');">add_virtual_parent_caller</a></tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">)</tt> </tt>
<a name="L208"></a><tt class="py-lineno"> 208</tt>  <tt class="py-line"> </tt>
<a name="L209"></a><tt class="py-lineno"> 209</tt>  <tt class="py-line">            <tt class="py-name">proxy</tt> <tt class="py-op">=</tt> <tt id="link-75" class="py-name" targets="Class pybindgen.cppmethod.CppVirtualMethodProxy=pybindgen.cppmethod.CppVirtualMethodProxy-class.html"><a title="pybindgen.cppmethod.CppVirtualMethodProxy" class="py-name" href="#" onclick="return doclink('link-75', 'CppVirtualMethodProxy', 'link-75');">CppVirtualMethodProxy</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L210"></a><tt class="py-lineno"> 210</tt>  <tt class="py-line">            <tt class="py-name">proxy</tt><tt class="py-op">.</tt><tt class="py-name">main_wrapper</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt> <tt class="py-comment"># XXX: need to explain this</tt> </tt>
<a name="L211"></a><tt class="py-lineno"> 211</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Method pybindgen.cppclass.CppHelperClass.add_virtual_proxy()=pybindgen.cppclass.CppHelperClass-class.html#add_virtual_proxy"><a title="pybindgen.cppclass.CppHelperClass.add_virtual_proxy" class="py-name" href="#" onclick="return doclink('link-76', 'add_virtual_proxy', 'link-76');">add_virtual_proxy</a></tt><tt class="py-op">(</tt><tt class="py-name">proxy</tt><tt class="py-op">)</tt> </tt>
</div><a name="L212"></a><tt class="py-lineno"> 212</tt>  <tt class="py-line">         </tt>
<a name="L213"></a><tt class="py-lineno"> 213</tt>  <tt class="py-line">         </tt>
<a name="CppHelperClass.add_virtual_parent_caller"></a><div id="CppHelperClass.add_virtual_parent_caller-def"><a name="L214"></a><tt class="py-lineno"> 214</tt> <a class="py-toggle" href="#" id="CppHelperClass.add_virtual_parent_caller-toggle" onclick="return toggle('CppHelperClass.add_virtual_parent_caller');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#add_virtual_parent_caller">add_virtual_parent_caller</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">parent_caller</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.add_virtual_parent_caller-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.add_virtual_parent_caller-expanded"><a name="L215"></a><tt class="py-lineno"> 215</tt>  <tt class="py-line">        <tt class="py-docstring">"""Add a new CppVirtualMethodParentCaller object to this helper class"""</tt> </tt>
<a name="L216"></a><tt class="py-lineno"> 216</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">,</tt> <tt id="link-77" class="py-name"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller" class="py-name" href="#" onclick="return doclink('link-77', 'CppVirtualMethodParentCaller', 'link-72');">CppVirtualMethodParentCaller</a></tt><tt class="py-op">)</tt> </tt>
<a name="L217"></a><tt class="py-lineno"> 217</tt>  <tt class="py-line"> </tt>
<a name="L218"></a><tt class="py-lineno"> 218</tt>  <tt class="py-line">        <tt id="link-78" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-78', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt class="py-name">method_name</tt> </tt>
<a name="L219"></a><tt class="py-lineno"> 219</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L220"></a><tt class="py-lineno"> 220</tt>  <tt class="py-line">            <tt class="py-name">overload</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_parent_callers</tt><tt class="py-op">[</tt><tt id="link-79" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-79', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L221"></a><tt class="py-lineno"> 221</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L222"></a><tt class="py-lineno"> 222</tt>  <tt class="py-line">            <tt class="py-name">overload</tt> <tt class="py-op">=</tt> <tt id="link-80" class="py-name" targets="Class pybindgen.cppmethod.CppOverloadedMethod=pybindgen.cppmethod.CppOverloadedMethod-class.html"><a title="pybindgen.cppmethod.CppOverloadedMethod" class="py-name" href="#" onclick="return doclink('link-80', 'CppOverloadedMethod', 'link-80');">CppOverloadedMethod</a></tt><tt class="py-op">(</tt><tt id="link-81" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-81', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L223"></a><tt class="py-lineno"> 223</tt>  <tt class="py-line">            <tt class="py-comment">## implicit conversions + virtual methods disabled</tt> </tt>
<a name="L224"></a><tt class="py-lineno"> 224</tt>  <tt class="py-line">            <tt class="py-comment">## temporarily until I can figure out how to fix the unit</tt> </tt>
<a name="L225"></a><tt class="py-lineno"> 225</tt>  <tt class="py-line">            <tt class="py-comment">## tests.</tt> </tt>
<a name="L226"></a><tt class="py-lineno"> 226</tt>  <tt class="py-line">            <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">enable_implicit_conversions</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L227"></a><tt class="py-lineno"> 227</tt>  <tt class="py-line">            <tt class="py-comment">#overload.static_decl = False</tt> </tt>
<a name="L228"></a><tt class="py-lineno"> 228</tt>  <tt class="py-line">            <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-82', 'pystruct', 'link-68');">pystruct</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-83', 'class_', 'link-64');">class_</a></tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-84', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L229"></a><tt class="py-lineno"> 229</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_parent_callers</tt><tt class="py-op">[</tt><tt id="link-85" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-85', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">overload</tt> </tt>
<a name="L230"></a><tt class="py-lineno"> 230</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-86" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-86', 'class_', 'link-64');">class_</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L231"></a><tt class="py-lineno"> 231</tt>  <tt class="py-line">        <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name" targets="Method pybindgen.overloading.OverloadedWrapper.add()=pybindgen.overloading.OverloadedWrapper-class.html#add"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-87', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">)</tt> </tt>
</div><a name="L232"></a><tt class="py-lineno"> 232</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.add_custom_method"></a><div id="CppHelperClass.add_custom_method-def"><a name="L233"></a><tt class="py-lineno"> 233</tt> <a class="py-toggle" href="#" id="CppHelperClass.add_custom_method-toggle" onclick="return toggle('CppHelperClass.add_custom_method');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#add_custom_method">add_custom_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">declaration</tt><tt class="py-op">,</tt> <tt class="py-param">body</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.add_custom_method-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.add_custom_method-expanded"><a name="L234"></a><tt class="py-lineno"> 234</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L235"></a><tt class="py-lineno"> 235</tt>  <tt class="py-line"><tt class="py-docstring">        Add a custom method to the helper class, given by a</tt> </tt>
<a name="L236"></a><tt class="py-lineno"> 236</tt>  <tt class="py-line"><tt class="py-docstring">        declaration line and a body.  The body can be None, in case</tt> </tt>
<a name="L237"></a><tt class="py-lineno"> 237</tt>  <tt class="py-line"><tt class="py-docstring">        the whole method definition is included in the declaration</tt> </tt>
<a name="L238"></a><tt class="py-lineno"> 238</tt>  <tt class="py-line"><tt class="py-docstring">        itself.</tt> </tt>
<a name="L239"></a><tt class="py-lineno"> 239</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L240"></a><tt class="py-lineno"> 240</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_methods</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">declaration</tt><tt class="py-op">,</tt> <tt class="py-name">body</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L241"></a><tt class="py-lineno"> 241</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.add_post_generation_code"></a><div id="CppHelperClass.add_post_generation_code-def"><a name="L242"></a><tt class="py-lineno"> 242</tt> <a class="py-toggle" href="#" id="CppHelperClass.add_post_generation_code-toggle" onclick="return toggle('CppHelperClass.add_post_generation_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#add_post_generation_code">add_post_generation_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.add_post_generation_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.add_post_generation_code-expanded"><a name="L243"></a><tt class="py-lineno"> 243</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L244"></a><tt class="py-lineno"> 244</tt>  <tt class="py-line"><tt class="py-docstring">        Add custom code to be included right after the helper class is generated.</tt> </tt>
<a name="L245"></a><tt class="py-lineno"> 245</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L246"></a><tt class="py-lineno"> 246</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">post_generation_code</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
</div><a name="L247"></a><tt class="py-lineno"> 247</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.add_virtual_proxy"></a><div id="CppHelperClass.add_virtual_proxy-def"><a name="L248"></a><tt class="py-lineno"> 248</tt> <a class="py-toggle" href="#" id="CppHelperClass.add_virtual_proxy-toggle" onclick="return toggle('CppHelperClass.add_virtual_proxy');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#add_virtual_proxy">add_virtual_proxy</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">virtual_proxy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.add_virtual_proxy-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.add_virtual_proxy-expanded"><a name="L249"></a><tt class="py-lineno"> 249</tt>  <tt class="py-line">        <tt class="py-docstring">"""Add a new CppVirtualMethodProxy object to this class"""</tt> </tt>
<a name="L250"></a><tt class="py-lineno"> 250</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">virtual_proxy</tt><tt class="py-op">,</tt> <tt id="link-88" class="py-name"><a title="pybindgen.cppmethod.CppVirtualMethodProxy" class="py-name" href="#" onclick="return doclink('link-88', 'CppVirtualMethodProxy', 'link-75');">CppVirtualMethodProxy</a></tt><tt class="py-op">)</tt> </tt>
<a name="L251"></a><tt class="py-lineno"> 251</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_proxies</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">virtual_proxy</tt><tt class="py-op">)</tt> </tt>
</div><a name="L252"></a><tt class="py-lineno"> 252</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.generate_forward_declarations"></a><div id="CppHelperClass.generate_forward_declarations-def"><a name="L253"></a><tt class="py-lineno"> 253</tt> <a class="py-toggle" href="#" id="CppHelperClass.generate_forward_declarations-toggle" onclick="return toggle('CppHelperClass.generate_forward_declarations');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#generate_forward_declarations">generate_forward_declarations</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink_param</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.generate_forward_declarations-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.generate_forward_declarations-expanded"><a name="L254"></a><tt class="py-lineno"> 254</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L255"></a><tt class="py-lineno"> 255</tt>  <tt class="py-line"><tt class="py-docstring">        Generate the proxy class (declaration only) to a given code sink</tt> </tt>
<a name="L256"></a><tt class="py-lineno"> 256</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L257"></a><tt class="py-lineno"> 257</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink" class="py-name" href="#" onclick="return doclink('link-89', 'MemoryCodeSink', 'link-14');">MemoryCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L258"></a><tt class="py-lineno"> 258</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_forward_declarations</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L259"></a><tt class="py-lineno"> 259</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name" targets="Method pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#flush_to,Method pybindgen.typehandlers.codesink.NullCodeSink.flush_to()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#flush_to"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-90', 'flush_to', 'link-90');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink_param</tt><tt class="py-op">)</tt> </tt>
<a name="L260"></a><tt class="py-lineno"> 260</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L261"></a><tt class="py-lineno"> 261</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L262"></a><tt class="py-lineno"> 262</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass._generate_forward_declarations"></a><div id="CppHelperClass._generate_forward_declarations-def"><a name="L263"></a><tt class="py-lineno"> 263</tt> <a class="py-toggle" href="#" id="CppHelperClass._generate_forward_declarations-toggle" onclick="return toggle('CppHelperClass._generate_forward_declarations');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#_generate_forward_declarations">_generate_forward_declarations</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass._generate_forward_declarations-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass._generate_forward_declarations-expanded"><a name="L264"></a><tt class="py-lineno"> 264</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L265"></a><tt class="py-lineno"> 265</tt>  <tt class="py-line"><tt class="py-docstring">        Generate the proxy class (declaration only) to a given code sink.</tt> </tt>
<a name="L266"></a><tt class="py-lineno"> 266</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L267"></a><tt class="py-lineno"> 267</tt>  <tt class="py-line"><tt class="py-docstring">        Returns True if all is well, False if a pure virtual method</tt> </tt>
<a name="L268"></a><tt class="py-lineno"> 268</tt>  <tt class="py-line"><tt class="py-docstring">        was found that could not be generated.</tt> </tt>
<a name="L269"></a><tt class="py-lineno"> 269</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L270"></a><tt class="py-lineno"> 270</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name" targets="Method pybindgen.typehandlers.codesink.CodeSink.writeln()=pybindgen.typehandlers.codesink.CodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.FileCodeSink.writeln()=pybindgen.typehandlers.codesink.FileCodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.MemoryCodeSink.writeln()=pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#writeln,Method pybindgen.typehandlers.codesink.NullCodeSink.writeln()=pybindgen.typehandlers.codesink.NullCodeSink-class.html#writeln"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-91', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"class %s : public %s\n{\npublic:"</tt> <tt class="py-op">%</tt> </tt>
<a name="L271"></a><tt class="py-lineno"> 271</tt>  <tt class="py-line">                          <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-92', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-93', 'class_', 'link-64');">class_</a></tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L272"></a><tt class="py-lineno"> 272</tt>  <tt class="py-line"> </tt>
<a name="L273"></a><tt class="py-lineno"> 273</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.indent()=pybindgen.typehandlers.base.CodeBlock-class.html#indent,Method pybindgen.typehandlers.codesink.CodeSink.indent()=pybindgen.typehandlers.codesink.CodeSink-class.html#indent"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-94', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L274"></a><tt class="py-lineno"> 274</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-95', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"PyObject *m_pyself;"</tt><tt class="py-op">)</tt> </tt>
<a name="L275"></a><tt class="py-lineno"> 275</tt>  <tt class="py-line"> </tt>
<a name="L276"></a><tt class="py-lineno"> 276</tt>  <tt class="py-line">        <tt class="py-comment">## replicate the parent constructors in the helper class</tt> </tt>
<a name="L277"></a><tt class="py-lineno"> 277</tt>  <tt class="py-line">        <tt class="py-name">implemented_constructor_signatures</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L278"></a><tt class="py-lineno"> 278</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">cons</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-96', 'class_', 'link-64');">class_</a></tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt><tt class="py-op">:</tt> </tt>
<a name="L279"></a><tt class="py-lineno"> 279</tt>  <tt class="py-line"> </tt>
<a name="L280"></a><tt class="py-lineno"> 280</tt>  <tt class="py-line">            <tt class="py-comment">## filter out duplicated constructors</tt> </tt>
<a name="L281"></a><tt class="py-lineno"> 281</tt>  <tt class="py-line">            <tt class="py-name">signature</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-97" class="py-name" targets="Function pybindgen.utils.param()=pybindgen.utils-module.html#param"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-97', 'param', 'link-97');">param</a></tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt> <tt class="py-keyword">for</tt> <tt id="link-98" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-98', 'param', 'link-97');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">]</tt> </tt>
<a name="L282"></a><tt class="py-lineno"> 282</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">signature</tt> <tt class="py-keyword">in</tt> <tt class="py-name">implemented_constructor_signatures</tt><tt class="py-op">:</tt> </tt>
<a name="L283"></a><tt class="py-lineno"> 283</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L284"></a><tt class="py-lineno"> 284</tt>  <tt class="py-line">            <tt class="py-name">implemented_constructor_signatures</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">signature</tt><tt class="py-op">)</tt> </tt>
<a name="L285"></a><tt class="py-lineno"> 285</tt>  <tt class="py-line"> </tt>
<a name="L286"></a><tt class="py-lineno"> 286</tt>  <tt class="py-line">            <tt class="py-name">params</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt id="link-99" class="py-name"><a title="pybindgen.typehandlers.base.join_ctype_and_name" class="py-name" href="#" onclick="return doclink('link-99', 'join_ctype_and_name', 'link-4');">join_ctype_and_name</a></tt><tt class="py-op">(</tt><tt id="link-100" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-100', 'param', 'link-97');">param</a></tt><tt class="py-op">.</tt><tt class="py-name">ctype</tt><tt class="py-op">,</tt> <tt id="link-101" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-101', 'param', 'link-97');">param</a></tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-102', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L287"></a><tt class="py-lineno"> 287</tt>  <tt class="py-line">                      <tt class="py-keyword">for</tt> <tt id="link-103" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-103', 'param', 'link-97');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">]</tt> </tt>
<a name="L288"></a><tt class="py-lineno"> 288</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-104', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s(%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-105" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-105', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">params</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L289"></a><tt class="py-lineno"> 289</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-106', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L290"></a><tt class="py-lineno"> 290</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-107', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">": %s(%s), m_pyself(NULL)\n{}"</tt> <tt class="py-op">%</tt> </tt>
<a name="L291"></a><tt class="py-lineno"> 291</tt>  <tt class="py-line">                              <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-108', 'class_', 'link-64');">class_</a></tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> </tt>
<a name="L292"></a><tt class="py-lineno"> 292</tt>  <tt class="py-line">                               <tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt id="link-109" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-109', 'param', 'link-97');">param</a></tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-110', 'name', 'link-66');">name</a></tt> <tt class="py-keyword">for</tt> <tt id="link-111" class="py-name"><a title="pybindgen.utils.param" class="py-name" href="#" onclick="return doclink('link-111', 'param', 'link-97');">param</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L293"></a><tt class="py-lineno"> 293</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.unindent()=pybindgen.typehandlers.base.CodeBlock-class.html#unindent,Method pybindgen.typehandlers.codesink.CodeSink.unindent()=pybindgen.typehandlers.codesink.CodeSink-class.html#unindent"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-112', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L294"></a><tt class="py-lineno"> 294</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-113', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L295"></a><tt class="py-lineno"> 295</tt>  <tt class="py-line"> </tt>
<a name="L296"></a><tt class="py-lineno"> 296</tt>  <tt class="py-line">        <tt class="py-comment">## add the set_pyobj method</tt> </tt>
<a name="L297"></a><tt class="py-lineno"> 297</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-114', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"""</tt> </tt>
<a name="L298"></a><tt class="py-lineno"> 298</tt>  <tt class="py-line"><tt class="py-string">void set_pyobj(PyObject *pyobj)</tt> </tt>
<a name="L299"></a><tt class="py-lineno"> 299</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L300"></a><tt class="py-lineno"> 300</tt>  <tt class="py-line"><tt class="py-string">    Py_XDECREF(m_pyself);</tt> </tt>
<a name="L301"></a><tt class="py-lineno"> 301</tt>  <tt class="py-line"><tt class="py-string">    Py_INCREF(pyobj);</tt> </tt>
<a name="L302"></a><tt class="py-lineno"> 302</tt>  <tt class="py-line"><tt class="py-string">    m_pyself = pyobj;</tt> </tt>
<a name="L303"></a><tt class="py-lineno"> 303</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L304"></a><tt class="py-lineno"> 304</tt>  <tt class="py-line"><tt class="py-string">"""</tt><tt class="py-op">)</tt> </tt>
<a name="L305"></a><tt class="py-lineno"> 305</tt>  <tt class="py-line"> </tt>
<a name="L306"></a><tt class="py-lineno"> 306</tt>  <tt class="py-line">        <tt class="py-comment">## write a destructor</tt> </tt>
<a name="L307"></a><tt class="py-lineno"> 307</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-115', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"virtual ~%s()\n{"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-116', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L308"></a><tt class="py-lineno"> 308</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-117" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-117', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L309"></a><tt class="py-lineno"> 309</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-118', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_CLEAR(m_pyself);"</tt><tt class="py-op">)</tt> </tt>
<a name="L310"></a><tt class="py-lineno"> 310</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-119', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L311"></a><tt class="py-lineno"> 311</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-120', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L312"></a><tt class="py-lineno"> 312</tt>  <tt class="py-line">             </tt>
<a name="L313"></a><tt class="py-lineno"> 313</tt>  <tt class="py-line">        <tt class="py-comment">## write the parent callers (_name)</tt> </tt>
<a name="L314"></a><tt class="py-lineno"> 314</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">parent_caller</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_parent_callers</tt><tt class="py-op">.</tt><tt class="py-name">itervalues</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L315"></a><tt class="py-lineno"> 315</tt>  <tt class="py-line">            <tt class="py-comment">#parent_caller.class_ = self.class_</tt> </tt>
<a name="L316"></a><tt class="py-lineno"> 316</tt>  <tt class="py-line">            <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-121', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L317"></a><tt class="py-lineno"> 317</tt>  <tt class="py-line">            <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name" targets="Method pybindgen.container.IterNextWrapper.reset_code_generation_state()=pybindgen.container.IterNextWrapper-class.html#reset_code_generation_state,Method pybindgen.overloading.OverloadedWrapper.reset_code_generation_state()=pybindgen.overloading.OverloadedWrapper-class.html#reset_code_generation_state,Method pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state()=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state,Method pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#reset_code_generation_state"><a title="pybindgen.container.IterNextWrapper.reset_code_generation_state
pybindgen.overloading.OverloadedWrapper.reset_code_generation_state
pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state
pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state" class="py-name" href="#" onclick="return doclink('link-122', 'reset_code_generation_state', 'link-122');">reset_code_generation_state</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L318"></a><tt class="py-lineno"> 318</tt>  <tt class="py-line">            <tt class="py-comment">## test code generation</tt> </tt>
<a name="L319"></a><tt class="py-lineno"> 319</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L320"></a><tt class="py-lineno"> 320</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L321"></a><tt class="py-lineno"> 321</tt>  <tt class="py-line">                    <tt id="link-123" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-123', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-124" class="py-name" targets="Function pybindgen.utils.call_with_error_handling()=pybindgen.utils-module.html#call_with_error_handling"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-124', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name" targets="Method pybindgen.container.Container.generate()=pybindgen.container.Container-class.html#generate,Method pybindgen.container.IterNextWrapper.generate()=pybindgen.container.IterNextWrapper-class.html#generate,Method pybindgen.converter_functions.CToPythonConverter.generate()=pybindgen.converter_functions.CToPythonConverter-class.html#generate,Method pybindgen.converter_functions.PythonToCConverter.generate()=pybindgen.converter_functions.PythonToCConverter-class.html#generate,Method pybindgen.cppattribute.CppInstanceAttributeGetter.generate()=pybindgen.cppattribute.CppInstanceAttributeGetter-class.html#generate,Method pybindgen.cppattribute.CppInstanceAttributeSetter.generate()=pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate,Method pybindgen.cppattribute.CppStaticAttributeGetter.generate()=pybindgen.cppattribute.CppStaticAttributeGetter-class.html#generate,Method pybindgen.cppattribute.CppStaticAttributeSetter.generate()=pybindgen.cppattribute.CppStaticAttributeSetter-class.html#generate,Method pybindgen.cppattribute.PyGetSetDef.generate()=pybindgen.cppattribute.PyGetSetDef-class.html#generate,Method pybindgen.cppattribute.PyGetter.generate()=pybindgen.cppattribute.PyGetter-class.html#generate,Method pybindgen.cppattribute.PyMetaclass.generate()=pybindgen.cppattribute.PyMetaclass-class.html#generate,Method pybindgen.cppattribute.PySetter.generate()=pybindgen.cppattribute.PySetter-class.html#generate,Method pybindgen.cppclass.CppClass.generate()=pybindgen.cppclass.CppClass-class.html#generate,Method pybindgen.cppclass.CppHelperClass.generate()=pybindgen.cppclass.CppHelperClass-class.html#generate,Method pybindgen.cppmethod.CppConstructor.generate()=pybindgen.cppmethod.CppConstructor-class.html#generate,Method pybindgen.cppmethod.CppMethod.generate()=pybindgen.cppmethod.CppMethod-class.html#generate,Method pybindgen.cppmethod.CppNoConstructor.generate()=pybindgen.cppmethod.CppNoConstructor-class.html#generate,Method pybindgen.cppmethod.CppVirtualMethodProxy.generate()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#generate,Method pybindgen.cppmethod.CustomCppConstructorWrapper.generate()=pybindgen.cppmethod.CustomCppConstructorWrapper-class.html#generate,Method pybindgen.cppmethod.CustomCppMethodWrapper.generate()=pybindgen.cppmethod.CustomCppMethodWrapper-class.html#generate,Method pybindgen.enum.Enum.generate()=pybindgen.enum.Enum-class.html#generate,Method pybindgen.function.CustomFunctionWrapper.generate()=pybindgen.function.CustomFunctionWrapper-class.html#generate,Method pybindgen.function.Function.generate()=pybindgen.function.Function-class.html#generate,Method pybindgen.module.Module.generate()=pybindgen.module.Module-class.html#generate,Method pybindgen.overloading.OverloadedWrapper.generate()=pybindgen.overloading.OverloadedWrapper-class.html#generate,Method pybindgen.pytypeobject.PyNumberMethods.generate()=pybindgen.pytypeobject.PyNumberMethods-class.html#generate,Method pybindgen.pytypeobject.PySequenceMethods.generate()=pybindgen.pytypeobject.PySequenceMethods-class.html#generate,Method pybindgen.pytypeobject.PyTypeObject.generate()=pybindgen.pytypeobject.PyTypeObject-class.html#generate,Method pybindgen.typehandlers.base.ReverseWrapperBase.generate()=pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate,Method pybindgen.wrapper_registry.NullWrapperRegistry.generate()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#generate,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.generate()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#generate,Method pybindgen.wrapper_registry.WrapperRegistry.generate()=pybindgen.wrapper_registry.WrapperRegistry-class.html#generate"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-125', 'generate', 'link-125');">generate</a></tt><tt class="py-op">,</tt> </tt>
<a name="L322"></a><tt class="py-lineno"> 322</tt>  <tt class="py-line">                                                   <tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="pybindgen.typehandlers.codesink.NullCodeSink" class="py-name" href="#" onclick="return doclink('link-126', 'NullCodeSink', 'link-13');">NullCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">parent_caller</tt><tt class="py-op">)</tt> </tt>
<a name="L323"></a><tt class="py-lineno"> 323</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-127" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-127', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-128" class="py-name" targets="Class pybindgen.utils.SkipWrapper=pybindgen.utils.SkipWrapper-class.html"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-128', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L324"></a><tt class="py-lineno"> 324</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L325"></a><tt class="py-lineno"> 325</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L326"></a><tt class="py-lineno"> 326</tt>  <tt class="py-line">                <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="pybindgen.container.IterNextWrapper.reset_code_generation_state
pybindgen.overloading.OverloadedWrapper.reset_code_generation_state
pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state
pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state" class="py-name" href="#" onclick="return doclink('link-129', 'reset_code_generation_state', 'link-122');">reset_code_generation_state</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L327"></a><tt class="py-lineno"> 327</tt>  <tt class="py-line"> </tt>
<a name="L328"></a><tt class="py-lineno"> 328</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-130', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L329"></a><tt class="py-lineno"> 329</tt>  <tt class="py-line">            <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name" targets="Method pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_class_declaration()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#generate_class_declaration,Method pybindgen.overloading.OverloadedWrapper.generate_class_declaration()=pybindgen.overloading.OverloadedWrapper-class.html#generate_class_declaration"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_class_declaration
pybindgen.overloading.OverloadedWrapper.generate_class_declaration" class="py-name" href="#" onclick="return doclink('link-131', 'generate_class_declaration', 'link-131');">generate_class_declaration</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L330"></a><tt class="py-lineno"> 330</tt>  <tt class="py-line"> </tt>
<a name="L331"></a><tt class="py-lineno"> 331</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">parent_caller_wrapper</tt> <tt class="py-keyword">in</tt> <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt class="py-name">wrappers</tt><tt class="py-op">:</tt> </tt>
<a name="L332"></a><tt class="py-lineno"> 332</tt>  <tt class="py-line">                <tt class="py-name">parent_caller_wrapper</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name" targets="Method pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_parent_caller_method()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#generate_parent_caller_method"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_parent_caller_method" class="py-name" href="#" onclick="return doclink('link-132', 'generate_parent_caller_method', 'link-132');">generate_parent_caller_method</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L333"></a><tt class="py-lineno"> 333</tt>  <tt class="py-line"> </tt>
<a name="L334"></a><tt class="py-lineno"> 334</tt>  <tt class="py-line"> </tt>
<a name="L335"></a><tt class="py-lineno"> 335</tt>  <tt class="py-line">        <tt class="py-comment">## write the virtual proxies</tt> </tt>
<a name="L336"></a><tt class="py-lineno"> 336</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">virtual_proxy</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_proxies</tt><tt class="py-op">:</tt> </tt>
<a name="L337"></a><tt class="py-lineno"> 337</tt>  <tt class="py-line">            <tt class="py-comment">#virtual_proxy.class_ = self.class_</tt> </tt>
<a name="L338"></a><tt class="py-lineno"> 338</tt>  <tt class="py-line">            <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-133', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L339"></a><tt class="py-lineno"> 339</tt>  <tt class="py-line">            <tt class="py-comment">## test code generation</tt> </tt>
<a name="L340"></a><tt class="py-lineno"> 340</tt>  <tt class="py-line">            <tt class="py-comment">#virtual_proxy.class_ = self.class_</tt> </tt>
<a name="L341"></a><tt class="py-lineno"> 341</tt>  <tt class="py-line">            <tt class="py-comment">#virtual_proxy.helper_class = self</tt> </tt>
<a name="L342"></a><tt class="py-lineno"> 342</tt>  <tt class="py-line">            <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="pybindgen.container.IterNextWrapper.reset_code_generation_state
pybindgen.overloading.OverloadedWrapper.reset_code_generation_state
pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state
pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state" class="py-name" href="#" onclick="return doclink('link-134', 'reset_code_generation_state', 'link-122');">reset_code_generation_state</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L343"></a><tt class="py-lineno"> 343</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L344"></a><tt class="py-lineno"> 344</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L345"></a><tt class="py-lineno"> 345</tt>  <tt class="py-line">                    <tt id="link-135" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-135', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-136', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-137', 'generate', 'link-125');">generate</a></tt><tt class="py-op">,</tt> </tt>
<a name="L346"></a><tt class="py-lineno"> 346</tt>  <tt class="py-line">                                                   <tt class="py-op">(</tt><tt id="link-138" class="py-name"><a title="pybindgen.typehandlers.codesink.NullCodeSink" class="py-name" href="#" onclick="return doclink('link-138', 'NullCodeSink', 'link-13');">NullCodeSink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">virtual_proxy</tt><tt class="py-op">)</tt> </tt>
<a name="L347"></a><tt class="py-lineno"> 347</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-139" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-139', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-140', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L348"></a><tt class="py-lineno"> 348</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L349"></a><tt class="py-lineno"> 349</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L350"></a><tt class="py-lineno"> 350</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L351"></a><tt class="py-lineno"> 351</tt>  <tt class="py-line"> </tt>
<a name="L352"></a><tt class="py-lineno"> 352</tt>  <tt class="py-line">            <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L353"></a><tt class="py-lineno"> 353</tt>  <tt class="py-line">                <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="pybindgen.container.IterNextWrapper.reset_code_generation_state
pybindgen.overloading.OverloadedWrapper.reset_code_generation_state
pybindgen.typehandlers.base.ForwardWrapperBase.reset_code_generation_state
pybindgen.typehandlers.base.ReverseWrapperBase.reset_code_generation_state" class="py-name" href="#" onclick="return doclink('link-141', 'reset_code_generation_state', 'link-122');">reset_code_generation_state</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L354"></a><tt class="py-lineno"> 354</tt>  <tt class="py-line">                 </tt>
<a name="L355"></a><tt class="py-lineno"> 355</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-142', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L356"></a><tt class="py-lineno"> 356</tt>  <tt class="py-line">            <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-143" class="py-name" targets="Method pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_declaration()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#generate_declaration,Method pybindgen.cppmethod.CppVirtualMethodProxy.generate_declaration()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#generate_declaration,Method pybindgen.cppmethod.CustomCppMethodWrapper.generate_declaration()=pybindgen.cppmethod.CustomCppMethodWrapper-class.html#generate_declaration,Method pybindgen.enum.Enum.generate_declaration()=pybindgen.enum.Enum-class.html#generate_declaration,Method pybindgen.function.Function.generate_declaration()=pybindgen.function.Function-class.html#generate_declaration,Method pybindgen.overloading.OverloadedWrapper.generate_declaration()=pybindgen.overloading.OverloadedWrapper-class.html#generate_declaration"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller.generate_declaration
pybindgen.cppmethod.CppVirtualMethodProxy.generate_declaration
pybindgen.cppmethod.CustomCppMethodWrapper.generate_declaration
pybindgen.enum.Enum.generate_declaration
pybindgen.function.Function.generate_declaration
pybindgen.overloading.OverloadedWrapper.generate_declaration" class="py-name" href="#" onclick="return doclink('link-143', 'generate_declaration', 'link-143');">generate_declaration</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L357"></a><tt class="py-lineno"> 357</tt>  <tt class="py-line"> </tt>
<a name="L358"></a><tt class="py-lineno"> 358</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">custom_declaration</tt><tt class="py-op">,</tt> <tt class="py-name">dummy</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L359"></a><tt class="py-lineno"> 359</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-144', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">custom_declaration</tt><tt class="py-op">)</tt> </tt>
<a name="L360"></a><tt class="py-lineno"> 360</tt>  <tt class="py-line"> </tt>
<a name="L361"></a><tt class="py-lineno"> 361</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-145', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L362"></a><tt class="py-lineno"> 362</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-146', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"};\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L363"></a><tt class="py-lineno"> 363</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">code</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">post_generation_code</tt><tt class="py-op">:</tt> </tt>
<a name="L364"></a><tt class="py-lineno"> 364</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-147" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-147', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">code</tt><tt class="py-op">)</tt> </tt>
<a name="L365"></a><tt class="py-lineno"> 365</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-148', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L366"></a><tt class="py-lineno"> 366</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L367"></a><tt class="py-lineno"> 367</tt>  <tt class="py-line"> </tt>
<a name="CppHelperClass.generate"></a><div id="CppHelperClass.generate-def"><a name="L368"></a><tt class="py-lineno"> 368</tt> <a class="py-toggle" href="#" id="CppHelperClass.generate-toggle" onclick="return toggle('CppHelperClass.generate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppHelperClass-class.html#generate">generate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppHelperClass.generate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppHelperClass.generate-expanded"><a name="L369"></a><tt class="py-lineno"> 369</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L370"></a><tt class="py-lineno"> 370</tt>  <tt class="py-line"><tt class="py-docstring">        Generate the proxy class (virtual method bodies only) to a given code sink.</tt> </tt>
<a name="L371"></a><tt class="py-lineno"> 371</tt>  <tt class="py-line"><tt class="py-docstring">        returns pymethodef list of parent callers</tt> </tt>
<a name="L372"></a><tt class="py-lineno"> 372</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L373"></a><tt class="py-lineno"> 373</tt>  <tt class="py-line">        <tt class="py-comment">## write the parent callers (_name)</tt> </tt>
<a name="L374"></a><tt class="py-lineno"> 374</tt>  <tt class="py-line">        <tt class="py-name">method_defs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L375"></a><tt class="py-lineno"> 375</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt id="link-149" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-149', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">parent_caller</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_parent_callers</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L376"></a><tt class="py-lineno"> 376</tt>  <tt class="py-line">            <tt class="py-comment">#parent_caller.class_ = self.class_</tt> </tt>
<a name="L377"></a><tt class="py-lineno"> 377</tt>  <tt class="py-line">            <tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-150', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L378"></a><tt class="py-lineno"> 378</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-151', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L379"></a><tt class="py-lineno"> 379</tt>  <tt class="py-line"> </tt>
<a name="L380"></a><tt class="py-lineno"> 380</tt>  <tt class="py-line">            <tt class="py-comment">## parent_caller.generate(code_sink)</tt> </tt>
<a name="L381"></a><tt class="py-lineno"> 381</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L382"></a><tt class="py-lineno"> 382</tt>  <tt class="py-line">                <tt id="link-152" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-152', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-153', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-154', 'generate', 'link-125');">generate</a></tt><tt class="py-op">,</tt> </tt>
<a name="L383"></a><tt class="py-lineno"> 383</tt>  <tt class="py-line">                                               <tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">parent_caller</tt><tt class="py-op">)</tt> </tt>
<a name="L384"></a><tt class="py-lineno"> 384</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-155" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-155', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-156', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L385"></a><tt class="py-lineno"> 385</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L386"></a><tt class="py-lineno"> 386</tt>  <tt class="py-line">            <tt class="py-name">method_defs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">parent_caller</tt><tt class="py-op">.</tt><tt id="link-157" class="py-name" targets="Method pybindgen.cppmethod.CppMethod.get_py_method_def()=pybindgen.cppmethod.CppMethod-class.html#get_py_method_def,Method pybindgen.cppmethod.CppVirtualMethodParentCaller.get_py_method_def()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#get_py_method_def,Method pybindgen.function.Function.get_py_method_def()=pybindgen.function.Function-class.html#get_py_method_def,Method pybindgen.overloading.OverloadedWrapper.get_py_method_def()=pybindgen.overloading.OverloadedWrapper-class.html#get_py_method_def"><a title="pybindgen.cppmethod.CppMethod.get_py_method_def
pybindgen.cppmethod.CppVirtualMethodParentCaller.get_py_method_def
pybindgen.function.Function.get_py_method_def
pybindgen.overloading.OverloadedWrapper.get_py_method_def" class="py-name" href="#" onclick="return doclink('link-157', 'get_py_method_def', 'link-157');">get_py_method_def</a></tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt> <tt class="py-op">+</tt> <tt id="link-158" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-158', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L387"></a><tt class="py-lineno"> 387</tt>  <tt class="py-line">                 </tt>
<a name="L388"></a><tt class="py-lineno"> 388</tt>  <tt class="py-line">        <tt class="py-comment">## write the virtual proxies</tt> </tt>
<a name="L389"></a><tt class="py-lineno"> 389</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">virtual_proxy</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">virtual_proxies</tt><tt class="py-op">:</tt> </tt>
<a name="L390"></a><tt class="py-lineno"> 390</tt>  <tt class="py-line">            <tt class="py-comment">#virtual_proxy.class_ = self.class_</tt> </tt>
<a name="L391"></a><tt class="py-lineno"> 391</tt>  <tt class="py-line">            <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-159', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L392"></a><tt class="py-lineno"> 392</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-160" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-160', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L393"></a><tt class="py-lineno"> 393</tt>  <tt class="py-line"> </tt>
<a name="L394"></a><tt class="py-lineno"> 394</tt>  <tt class="py-line">            <tt class="py-comment">## virtual_proxy.generate(code_sink)</tt> </tt>
<a name="L395"></a><tt class="py-lineno"> 395</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L396"></a><tt class="py-lineno"> 396</tt>  <tt class="py-line">                <tt id="link-161" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-161', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-162" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-162', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt id="link-163" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-163', 'generate', 'link-125');">generate</a></tt><tt class="py-op">,</tt> </tt>
<a name="L397"></a><tt class="py-lineno"> 397</tt>  <tt class="py-line">                                               <tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">virtual_proxy</tt><tt class="py-op">)</tt> </tt>
<a name="L398"></a><tt class="py-lineno"> 398</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-164" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-164', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-165', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L399"></a><tt class="py-lineno"> 399</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-keyword">not</tt> <tt class="py-name">virtual_proxy</tt><tt class="py-op">.</tt><tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt> </tt>
<a name="L400"></a><tt class="py-lineno"> 400</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L401"></a><tt class="py-lineno"> 401</tt>  <tt class="py-line"> </tt>
<a name="L402"></a><tt class="py-lineno"> 402</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dummy</tt><tt class="py-op">,</tt> <tt class="py-name">custom_body</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L403"></a><tt class="py-lineno"> 403</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">custom_body</tt><tt class="py-op">:</tt> </tt>
<a name="L404"></a><tt class="py-lineno"> 404</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-166" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-166', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">custom_body</tt><tt class="py-op">)</tt> </tt>
<a name="L405"></a><tt class="py-lineno"> 405</tt>  <tt class="py-line">         </tt>
<a name="L406"></a><tt class="py-lineno"> 406</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">method_defs</tt> </tt>
</div></div><a name="L407"></a><tt class="py-lineno"> 407</tt>  <tt class="py-line"> </tt>
<a name="L408"></a><tt class="py-lineno"> 408</tt>  <tt class="py-line"> </tt>
<a name="L409"></a><tt class="py-lineno"> 409</tt>  <tt class="py-line"> </tt>
<a name="CppClass"></a><div id="CppClass-def"><a name="L410"></a><tt class="py-lineno"> 410</tt> <a class="py-toggle" href="#" id="CppClass-toggle" onclick="return toggle('CppClass');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html">CppClass</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass-collapsed" style="display:none;" pad="++++" indent="++++"></div><div id="CppClass-expanded"><a name="L411"></a><tt class="py-lineno"> 411</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L412"></a><tt class="py-lineno"> 412</tt>  <tt class="py-line"><tt class="py-docstring">    A CppClass object takes care of generating the code for wrapping a C++ class</tt> </tt>
<a name="L413"></a><tt class="py-lineno"> 413</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L414"></a><tt class="py-lineno"> 414</tt>  <tt class="py-line"> </tt>
<a name="CppClass.__init__"></a><div id="CppClass.__init__-def"><a name="L415"></a><tt class="py-lineno"> 415</tt> <a class="py-toggle" href="#" id="CppClass.__init__-toggle" onclick="return toggle('CppClass.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">parent</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">incref_method</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">decref_method</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L416"></a><tt class="py-lineno"> 416</tt>  <tt class="py-line">                 <tt class="py-param">automatic_type_narrowing</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">allow_subclassing</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L417"></a><tt class="py-lineno"> 417</tt>  <tt class="py-line">                 <tt class="py-param">is_singleton</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">outer_class</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L418"></a><tt class="py-lineno"> 418</tt>  <tt class="py-line">                 <tt class="py-param">peekref_method</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L419"></a><tt class="py-lineno"> 419</tt>  <tt class="py-line">                 <tt class="py-param">template_parameters</tt><tt class="py-op">=</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-param">custom_template_class_name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L420"></a><tt class="py-lineno"> 420</tt>  <tt class="py-line">                 <tt class="py-param">incomplete_type</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">free_function</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L421"></a><tt class="py-lineno"> 421</tt>  <tt class="py-line">                 <tt class="py-param">incref_function</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">decref_function</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L422"></a><tt class="py-lineno"> 422</tt>  <tt class="py-line">                 <tt class="py-param">python_name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">memory_policy</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L423"></a><tt class="py-lineno"> 423</tt>  <tt class="py-line">                 <tt class="py-param">foreign_cpp_namespace</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L424"></a><tt class="py-lineno"> 424</tt>  <tt class="py-line">                 <tt class="py-param">docstring</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.__init__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.__init__-expanded"><a name="L425"></a><tt class="py-lineno"> 425</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L426"></a><tt class="py-lineno"> 426</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: class name</tt> </tt>
<a name="L427"></a><tt class="py-lineno"> 427</tt>  <tt class="py-line"><tt class="py-docstring">        @param parent: optional parent class wrapper</tt> </tt>
<a name="L428"></a><tt class="py-lineno"> 428</tt>  <tt class="py-line"><tt class="py-docstring">        @param incref_method: (deprecated in favour of memory_policy) if the class supports reference counting, the</tt> </tt>
<a name="L429"></a><tt class="py-lineno"> 429</tt>  <tt class="py-line"><tt class="py-docstring">                         name of the method that increments the</tt> </tt>
<a name="L430"></a><tt class="py-lineno"> 430</tt>  <tt class="py-line"><tt class="py-docstring">                         reference count (may be inherited from parent</tt> </tt>
<a name="L431"></a><tt class="py-lineno"> 431</tt>  <tt class="py-line"><tt class="py-docstring">                         if not given)</tt> </tt>
<a name="L432"></a><tt class="py-lineno"> 432</tt>  <tt class="py-line"><tt class="py-docstring">        @param decref_method: (deprecated in favour of memory_policy) if the class supports reference counting, the</tt> </tt>
<a name="L433"></a><tt class="py-lineno"> 433</tt>  <tt class="py-line"><tt class="py-docstring">                         name of the method that decrements the</tt> </tt>
<a name="L434"></a><tt class="py-lineno"> 434</tt>  <tt class="py-line"><tt class="py-docstring">                         reference count (may be inherited from parent</tt> </tt>
<a name="L435"></a><tt class="py-lineno"> 435</tt>  <tt class="py-line"><tt class="py-docstring">                         if not given)</tt> </tt>
<a name="L436"></a><tt class="py-lineno"> 436</tt>  <tt class="py-line"><tt class="py-docstring">        @param automatic_type_narrowing: if True, automatic return type</tt> </tt>
<a name="L437"></a><tt class="py-lineno"> 437</tt>  <tt class="py-line"><tt class="py-docstring">                                    narrowing will be done on objects</tt> </tt>
<a name="L438"></a><tt class="py-lineno"> 438</tt>  <tt class="py-line"><tt class="py-docstring">                                    of this class and its descendants</tt> </tt>
<a name="L439"></a><tt class="py-lineno"> 439</tt>  <tt class="py-line"><tt class="py-docstring">                                    when returned by pointer from a</tt> </tt>
<a name="L440"></a><tt class="py-lineno"> 440</tt>  <tt class="py-line"><tt class="py-docstring">                                    function or method.</tt> </tt>
<a name="L441"></a><tt class="py-lineno"> 441</tt>  <tt class="py-line"><tt class="py-docstring">        @param allow_subclassing: if True, generated class wrappers will</tt> </tt>
<a name="L442"></a><tt class="py-lineno"> 442</tt>  <tt class="py-line"><tt class="py-docstring">                             allow subclassing in Python.</tt> </tt>
<a name="L443"></a><tt class="py-lineno"> 443</tt>  <tt class="py-line"><tt class="py-docstring">        @param is_singleton: if True, the class is considered a singleton,</tt> </tt>
<a name="L444"></a><tt class="py-lineno"> 444</tt>  <tt class="py-line"><tt class="py-docstring">                        and so the python wrapper will never call the</tt> </tt>
<a name="L445"></a><tt class="py-lineno"> 445</tt>  <tt class="py-line"><tt class="py-docstring">                        C++ class destructor to free the value.</tt> </tt>
<a name="L446"></a><tt class="py-lineno"> 446</tt>  <tt class="py-line"><tt class="py-docstring">        @param peekref_method: (deprecated in favour of memory_policy) if the class supports reference counting, the</tt> </tt>
<a name="L447"></a><tt class="py-lineno"> 447</tt>  <tt class="py-line"><tt class="py-docstring">                          name of the method that returns the current reference count.</tt> </tt>
<a name="L448"></a><tt class="py-lineno"> 448</tt>  <tt class="py-line"><tt class="py-docstring">        @param free_function: (deprecated in favour of memory_policy) name of C function used to deallocate class instances</tt> </tt>
<a name="L449"></a><tt class="py-lineno"> 449</tt>  <tt class="py-line"><tt class="py-docstring">        @param incref_function: (deprecated in favour of memory_policy) same as incref_method, but as a function instead of method</tt> </tt>
<a name="L450"></a><tt class="py-lineno"> 450</tt>  <tt class="py-line"><tt class="py-docstring">        @param decref_function: (deprecated in favour of memory_policy) same as decref_method, but as a function instead of method</tt> </tt>
<a name="L451"></a><tt class="py-lineno"> 451</tt>  <tt class="py-line"><tt class="py-docstring">        @param python_name: name of the class as it will appear from Python side</tt> </tt>
<a name="L452"></a><tt class="py-lineno"> 452</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L453"></a><tt class="py-lineno"> 453</tt>  <tt class="py-line"><tt class="py-docstring">        @param memory_policy: memory management policy; if None, it</tt> </tt>
<a name="L454"></a><tt class="py-lineno"> 454</tt>  <tt class="py-line"><tt class="py-docstring">        inherits from the parent class.  Only root classes can have a</tt> </tt>
<a name="L455"></a><tt class="py-lineno"> 455</tt>  <tt class="py-line"><tt class="py-docstring">        memory policy defined.</tt> </tt>
<a name="L456"></a><tt class="py-lineno"> 456</tt>  <tt class="py-line"><tt class="py-docstring">        @type memory_policy: L{MemoryPolicy}</tt> </tt>
<a name="L457"></a><tt class="py-lineno"> 457</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L458"></a><tt class="py-lineno"> 458</tt>  <tt class="py-line"><tt class="py-docstring">        @param foreign_cpp_namespace: if set, the class is assumed to</tt> </tt>
<a name="L459"></a><tt class="py-lineno"> 459</tt>  <tt class="py-line"><tt class="py-docstring">        belong to the given C++ namespace, regardless of the C++</tt> </tt>
<a name="L460"></a><tt class="py-lineno"> 460</tt>  <tt class="py-line"><tt class="py-docstring">        namespace of the python module it will be added to.  For</tt> </tt>
<a name="L461"></a><tt class="py-lineno"> 461</tt>  <tt class="py-line"><tt class="py-docstring">        instance, this can be useful to wrap std classes, like</tt> </tt>
<a name="L462"></a><tt class="py-lineno"> 462</tt>  <tt class="py-line"><tt class="py-docstring">        std::ofstream, without having to create an extra python</tt> </tt>
<a name="L463"></a><tt class="py-lineno"> 463</tt>  <tt class="py-line"><tt class="py-docstring">        submodule.</tt> </tt>
<a name="L464"></a><tt class="py-lineno"> 464</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L465"></a><tt class="py-lineno"> 465</tt>  <tt class="py-line"><tt class="py-docstring">        @param docstring: None or a string containing the docstring</tt> </tt>
<a name="L466"></a><tt class="py-lineno"> 466</tt>  <tt class="py-line"><tt class="py-docstring">        that will be generated for the class</tt> </tt>
<a name="L467"></a><tt class="py-lineno"> 467</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L468"></a><tt class="py-lineno"> 468</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L469"></a><tt class="py-lineno"> 469</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">outer_class</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">outer_class</tt><tt class="py-op">,</tt> <tt id="link-167" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-167', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt> </tt>
<a name="L470"></a><tt class="py-lineno"> 470</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incomplete_type</tt> <tt class="py-op">=</tt> <tt class="py-name">incomplete_type</tt> </tt>
<a name="L471"></a><tt class="py-lineno"> 471</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt> <tt class="py-op">=</tt> <tt class="py-name">outer_class</tt> </tt>
<a name="L472"></a><tt class="py-lineno"> 472</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L473"></a><tt class="py-lineno"> 473</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-168', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-169" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-169', 'name', 'link-66');">name</a></tt> </tt>
<a name="L474"></a><tt class="py-lineno"> 474</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">docstring</tt> <tt class="py-op">=</tt> <tt class="py-name">docstring</tt> </tt>
<a name="L475"></a><tt class="py-lineno"> 475</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name" targets="Variable pybindgen.container.Container.python_name=pybindgen.container.Container-class.html#python_name"><a title="pybindgen.container.Container.python_name" class="py-name" href="#" onclick="return doclink('link-170', 'python_name', 'link-170');">python_name</a></tt> <tt class="py-op">=</tt> <tt id="link-171" class="py-name"><a title="pybindgen.container.Container.python_name" class="py-name" href="#" onclick="return doclink('link-171', 'python_name', 'link-170');">python_name</a></tt> </tt>
<a name="L476"></a><tt class="py-lineno"> 476</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L477"></a><tt class="py-lineno"> 477</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L478"></a><tt class="py-lineno"> 478</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">template_parameters</tt> <tt class="py-op">=</tt> <tt class="py-name">template_parameters</tt> </tt>
<a name="L479"></a><tt class="py-lineno"> 479</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_template_class_name</tt> <tt class="py-op">=</tt> <tt class="py-name">custom_template_class_name</tt> </tt>
<a name="L480"></a><tt class="py-lineno"> 480</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_singleton</tt> <tt class="py-op">=</tt> <tt class="py-name">is_singleton</tt> </tt>
<a name="L481"></a><tt class="py-lineno"> 481</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">foreign_cpp_namespace</tt> <tt class="py-op">=</tt> <tt class="py-name">foreign_cpp_namespace</tt> </tt>
<a name="L482"></a><tt class="py-lineno"> 482</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># full name with C++ namespaces attached and template parameters</tt> </tt>
<a name="L483"></a><tt class="py-lineno"> 483</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> <tt class="py-comment"># name =&gt; OverloadedMethod</tt> </tt>
<a name="L484"></a><tt class="py-lineno"> 484</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dummy_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># methods that have parameter/retval binding problems</tt> </tt>
<a name="L485"></a><tt class="py-lineno"> 485</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nonpublic_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L486"></a><tt class="py-lineno"> 486</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> <tt class="py-comment"># (name, wrapper) pairs</tt> </tt>
<a name="L487"></a><tt class="py-lineno"> 487</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytype</tt> <tt class="py-op">=</tt> <tt id="link-172" class="py-name"><a title="pybindgen.pytypeobject.PyTypeObject" class="py-name" href="#" onclick="return doclink('link-172', 'PyTypeObject', 'link-23');">PyTypeObject</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L488"></a><tt class="py-lineno"> 488</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytype</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt> </tt>
<a name="L489"></a><tt class="py-lineno"> 489</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-173', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L490"></a><tt class="py-lineno"> 490</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_creation_function</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L491"></a><tt class="py-lineno"> 491</tt>  <tt class="py-line">        <tt class="py-comment">## set to True when we become aware generating the helper</tt> </tt>
<a name="L492"></a><tt class="py-lineno"> 492</tt>  <tt class="py-line">        <tt class="py-comment">## class is not going to be possible</tt> </tt>
<a name="L493"></a><tt class="py-lineno"> 493</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_disabled</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L494"></a><tt class="py-lineno"> 494</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> <tt class="py-comment"># reason</tt> </tt>
<a name="L495"></a><tt class="py-lineno"> 495</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_trivial_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L496"></a><tt class="py-lineno"> 496</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_copy_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L497"></a><tt class="py-lineno"> 497</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_output_stream_operator</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L498"></a><tt class="py-lineno"> 498</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L499"></a><tt class="py-lineno"> 499</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_wrapper_registry</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L500"></a><tt class="py-lineno"> 500</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_comparison_operators</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L501"></a><tt class="py-lineno"> 501</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L502"></a><tt class="py-lineno"> 502</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L503"></a><tt class="py-lineno"> 503</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">valid_sequence_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">"__len__"</tt><tt class="py-op">,</tt> <tt class="py-string">"__getitem__"</tt><tt class="py-op">,</tt> <tt class="py-string">"__setitem__"</tt><tt class="py-op">)</tt> </tt>
<a name="L504"></a><tt class="py-lineno"> 504</tt>  <tt class="py-line"> </tt>
<a name="L505"></a><tt class="py-lineno"> 505</tt>  <tt class="py-line">        <tt class="py-comment">## list of CppClasses from which a value of this class can be</tt> </tt>
<a name="L506"></a><tt class="py-lineno"> 506</tt>  <tt class="py-line">        <tt class="py-comment">## implicitly generated; corresponds to a</tt> </tt>
<a name="L507"></a><tt class="py-lineno"> 507</tt>  <tt class="py-line">        <tt class="py-comment">## operator ThisClass(); in the other class.</tt> </tt>
<a name="L508"></a><tt class="py-lineno"> 508</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">implicitly_converts_from</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L509"></a><tt class="py-lineno"> 509</tt>  <tt class="py-line"> </tt>
<a name="L510"></a><tt class="py-lineno"> 510</tt>  <tt class="py-line">        <tt class="py-comment">## list of hook functions to call just prior to helper class</tt> </tt>
<a name="L511"></a><tt class="py-lineno"> 511</tt>  <tt class="py-line">        <tt class="py-comment">## code generation.</tt> </tt>
<a name="L512"></a><tt class="py-lineno"> 512</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_hooks</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L513"></a><tt class="py-lineno"> 513</tt>  <tt class="py-line"> </tt>
<a name="L514"></a><tt class="py-lineno"> 514</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment">#"***GIVE ME A NAME***"</tt> </tt>
<a name="L515"></a><tt class="py-lineno"> 515</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"***GIVE ME A NAME***"</tt> </tt>
<a name="L516"></a><tt class="py-lineno"> 516</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt> <tt class="py-op">=</tt> <tt class="py-string">"***GIVE ME A NAME***"</tt> </tt>
<a name="L517"></a><tt class="py-lineno"> 517</tt>  <tt class="py-line"> </tt>
<a name="L518"></a><tt class="py-lineno"> 518</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_attributes</tt> <tt class="py-op">=</tt> <tt id="link-174" class="py-name"><a title="pybindgen.cppattribute.PyGetSetDef" class="py-name" href="#" onclick="return doclink('link-174', 'PyGetSetDef', 'link-20');">PyGetSetDef</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s__getsets"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt><tt class="py-op">)</tt> </tt>
<a name="L519"></a><tt class="py-lineno"> 519</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt> <tt class="py-op">=</tt> <tt id="link-175" class="py-name"><a title="pybindgen.cppattribute.PyGetSetDef" class="py-name" href="#" onclick="return doclink('link-175', 'PyGetSetDef', 'link-20');">PyGetSetDef</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s__getsets"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt><tt class="py-op">)</tt> </tt>
<a name="L520"></a><tt class="py-lineno"> 520</tt>  <tt class="py-line"> </tt>
<a name="L521"></a><tt class="py-lineno"> 521</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt> </tt>
<a name="L522"></a><tt class="py-lineno"> 522</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parent</tt><tt class="py-op">,</tt> <tt id="link-176" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-176', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt> </tt>
<a name="L523"></a><tt class="py-lineno"> 523</tt>  <tt class="py-line"> </tt>
<a name="L524"></a><tt class="py-lineno"> 524</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">free_function</tt><tt class="py-op">:</tt> </tt>
<a name="L525"></a><tt class="py-lineno"> 525</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Use FreeFunctionPolicy and memory_policy parameter."</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L526"></a><tt class="py-lineno"> 526</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> </tt>
<a name="L527"></a><tt class="py-lineno"> 527</tt>  <tt class="py-line">            <tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt id="link-177" class="py-name"><a title="pybindgen.cppclass.FreeFunctionPolicy" class="py-name" href="#" onclick="return doclink('link-177', 'FreeFunctionPolicy', 'link-57');">FreeFunctionPolicy</a></tt><tt class="py-op">(</tt><tt class="py-name">free_function</tt><tt class="py-op">)</tt> </tt>
<a name="L528"></a><tt class="py-lineno"> 528</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">incref_method</tt><tt class="py-op">:</tt> </tt>
<a name="L529"></a><tt class="py-lineno"> 529</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Use ReferenceCountingMethodsPolicy and memory_policy parameter."</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L530"></a><tt class="py-lineno"> 530</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> </tt>
<a name="L531"></a><tt class="py-lineno"> 531</tt>  <tt class="py-line">            <tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt id="link-178" class="py-name"><a title="pybindgen.cppclass.ReferenceCountingMethodsPolicy" class="py-name" href="#" onclick="return doclink('link-178', 'ReferenceCountingMethodsPolicy', 'link-45');">ReferenceCountingMethodsPolicy</a></tt><tt class="py-op">(</tt><tt class="py-name">incref_method</tt><tt class="py-op">,</tt> <tt class="py-name">decref_method</tt><tt class="py-op">,</tt> <tt class="py-name">peekref_method</tt><tt class="py-op">)</tt> </tt>
<a name="L532"></a><tt class="py-lineno"> 532</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">incref_function</tt><tt class="py-op">:</tt> </tt>
<a name="L533"></a><tt class="py-lineno"> 533</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"Use ReferenceCountingFunctionsPolicy and memory_policy parameter."</tt><tt class="py-op">,</tt> <tt class="py-name">DeprecationWarning</tt><tt class="py-op">)</tt> </tt>
<a name="L534"></a><tt class="py-lineno"> 534</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> </tt>
<a name="L535"></a><tt class="py-lineno"> 535</tt>  <tt class="py-line">            <tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt id="link-179" class="py-name"><a title="pybindgen.cppclass.ReferenceCountingFunctionsPolicy" class="py-name" href="#" onclick="return doclink('link-179', 'ReferenceCountingFunctionsPolicy', 'link-51');">ReferenceCountingFunctionsPolicy</a></tt><tt class="py-op">(</tt><tt class="py-name">incref_function</tt><tt class="py-op">,</tt> <tt class="py-name">decref_function</tt><tt class="py-op">)</tt> </tt>
<a name="L536"></a><tt class="py-lineno"> 536</tt>  <tt class="py-line"> </tt>
<a name="L537"></a><tt class="py-lineno"> 537</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L538"></a><tt class="py-lineno"> 538</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">memory_policy</tt><tt class="py-op">,</tt> <tt id="link-180" class="py-name"><a title="pybindgen.cppclass.MemoryPolicy" class="py-name" href="#" onclick="return doclink('link-180', 'MemoryPolicy', 'link-44');">MemoryPolicy</a></tt><tt class="py-op">)</tt> </tt>
<a name="L539"></a><tt class="py-lineno"> 539</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt class="py-name">memory_policy</tt> </tt>
<a name="L540"></a><tt class="py-lineno"> 540</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L541"></a><tt class="py-lineno"> 541</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L542"></a><tt class="py-lineno"> 542</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt class="py-name">memory_policy</tt> </tt>
<a name="L543"></a><tt class="py-lineno"> 543</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L544"></a><tt class="py-lineno"> 544</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> </tt>
<a name="L545"></a><tt class="py-lineno"> 545</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> \ </tt>
<a name="L546"></a><tt class="py-lineno"> 546</tt>  <tt class="py-line">                    <tt class="py-string">"changing memory policy from parent (%s) to child (%s) class not permitted"</tt> \ </tt>
<a name="L547"></a><tt class="py-lineno"> 547</tt>  <tt class="py-line">                    <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-181" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-181', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-182" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-182', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L548"></a><tt class="py-lineno"> 548</tt>  <tt class="py-line"> </tt>
<a name="L549"></a><tt class="py-lineno"> 549</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-183" class="py-name" targets="Variable pybindgen.settings.automatic_type_narrowing=pybindgen.settings-module.html#automatic_type_narrowing"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-183', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L550"></a><tt class="py-lineno"> 550</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L551"></a><tt class="py-lineno"> 551</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-184" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-184', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> <tt class="py-op">=</tt> <tt id="link-185" class="py-name"><a title="pybindgen.settings" class="py-name" href="#" onclick="return doclink('link-185', 'settings', 'link-26');">settings</a></tt><tt class="py-op">.</tt><tt id="link-186" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-186', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> </tt>
<a name="L552"></a><tt class="py-lineno"> 552</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L553"></a><tt class="py-lineno"> 553</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-187', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-188" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-188', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> </tt>
<a name="L554"></a><tt class="py-lineno"> 554</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L555"></a><tt class="py-lineno"> 555</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-189" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-189', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> <tt class="py-op">=</tt> <tt id="link-190" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-190', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt> </tt>
<a name="L556"></a><tt class="py-lineno"> 556</tt>  <tt class="py-line"> </tt>
<a name="L557"></a><tt class="py-lineno"> 557</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-191" class="py-name" targets="Variable pybindgen.settings.allow_subclassing=pybindgen.settings-module.html#allow_subclassing"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-191', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L558"></a><tt class="py-lineno"> 558</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L559"></a><tt class="py-lineno"> 559</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-192" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-192', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> <tt class="py-op">=</tt> <tt id="link-193" class="py-name"><a title="pybindgen.settings" class="py-name" href="#" onclick="return doclink('link-193', 'settings', 'link-26');">settings</a></tt><tt class="py-op">.</tt><tt id="link-194" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-194', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> </tt>
<a name="L560"></a><tt class="py-lineno"> 560</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L561"></a><tt class="py-lineno"> 561</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-195" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-195', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> <tt class="py-op">=</tt> <tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-196', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> </tt>
<a name="L562"></a><tt class="py-lineno"> 562</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L563"></a><tt class="py-lineno"> 563</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt id="link-197" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-197', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> </tt>
<a name="L564"></a><tt class="py-lineno"> 564</tt>  <tt class="py-line">                                         <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-198" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-198', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt> \ </tt>
<a name="L565"></a><tt class="py-lineno"> 565</tt>  <tt class="py-line">                <tt class="py-string">"Cannot disable subclassing if the parent class allows it"</tt> </tt>
<a name="L566"></a><tt class="py-lineno"> 566</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-199', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> <tt class="py-op">=</tt> <tt id="link-200" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-200', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt> </tt>
<a name="L567"></a><tt class="py-lineno"> 567</tt>  <tt class="py-line"> </tt>
<a name="L568"></a><tt class="py-lineno"> 568</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L569"></a><tt class="py-lineno"> 569</tt>  <tt class="py-line"> </tt>
<a name="L570"></a><tt class="py-lineno"> 570</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt id="link-201" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-201', 'name', 'link-66');">name</a></tt> <tt class="py-op">!=</tt> <tt class="py-string">'dummy'</tt><tt class="py-op">:</tt> </tt>
<a name="L571"></a><tt class="py-lineno"> 571</tt>  <tt class="py-line">            <tt class="py-comment">## register type handlers</tt> </tt>
<a name="L572"></a><tt class="py-lineno"> 572</tt>  <tt class="py-line"> </tt>
<a name="L573"></a><tt class="py-lineno"> 573</tt>  <tt class="py-line">            <tt class="py-keyword">class</tt> <tt class="py-def-name">ThisClassParameter</tt><tt class="py-op">(</tt><tt class="py-base-class">CppClassParameter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L574"></a><tt class="py-lineno"> 574</tt>  <tt class="py-line">                <tt class="py-docstring">"""Register this C++ class as pass-by-value parameter"""</tt> </tt>
<a name="L575"></a><tt class="py-lineno"> 575</tt>  <tt class="py-line">                <tt id="link-202" class="py-name" targets="Variable pybindgen.container.ContainerParameter.CTYPES=pybindgen.container.ContainerParameter-class.html#CTYPES,Variable pybindgen.container.ContainerParameterBase.CTYPES=pybindgen.container.ContainerParameterBase-class.html#CTYPES,Variable pybindgen.container.ContainerPtrParameter.CTYPES=pybindgen.container.ContainerPtrParameter-class.html#CTYPES,Variable pybindgen.container.ContainerRefParameter.CTYPES=pybindgen.container.ContainerRefParameter-class.html#CTYPES,Variable pybindgen.container.ContainerReturnValue.CTYPES=pybindgen.container.ContainerReturnValue-class.html#CTYPES,Variable pybindgen.container.ContainerReturnValueBase.CTYPES=pybindgen.container.ContainerReturnValueBase-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#CTYPES,Variable pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES=pybindgen.cppclass_typehandlers.CppClassReturnValueBase-class.html#CTYPES,Variable pybindgen.cppmethod.DummyParameter.CTYPES=pybindgen.cppmethod.DummyParameter-class.html#CTYPES,Variable pybindgen.cppmethod.DummyReturnValue.CTYPES=pybindgen.cppmethod.DummyReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.base.Parameter.CTYPES=pybindgen.typehandlers.base.Parameter-class.html#CTYPES,Variable pybindgen.typehandlers.base.PointerParameter.CTYPES=pybindgen.typehandlers.base.PointerParameter-class.html#CTYPES,Variable pybindgen.typehandlers.base.PointerReturnValue.CTYPES=pybindgen.typehandlers.base.PointerReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.base.ReturnValue.CTYPES=pybindgen.typehandlers.base.ReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolParam.CTYPES=pybindgen.typehandlers.booltype.BoolParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES=pybindgen.typehandlers.booltype.BoolPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolRefParam.CTYPES=pybindgen.typehandlers.booltype.BoolRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.booltype.BoolReturn.CTYPES=pybindgen.typehandlers.booltype.BoolReturn-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleParam.CTYPES=pybindgen.typehandlers.doubletype.DoubleParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES=pybindgen.typehandlers.doubletype.DoublePtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES=pybindgen.typehandlers.doubletype.DoubleRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES=pybindgen.typehandlers.doubletype.DoubleReturn-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatParam.CTYPES=pybindgen.typehandlers.floattype.FloatParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES=pybindgen.typehandlers.floattype.FloatPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatRefParam.CTYPES=pybindgen.typehandlers.floattype.FloatRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.floattype.FloatReturn.CTYPES=pybindgen.typehandlers.floattype.FloatReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int16Param.CTYPES=pybindgen.typehandlers.inttype.Int16Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int16Return.CTYPES=pybindgen.typehandlers.inttype.Int16Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES=pybindgen.typehandlers.inttype.Int8PtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntParam.CTYPES=pybindgen.typehandlers.inttype.IntParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntPtrParam.CTYPES=pybindgen.typehandlers.inttype.IntPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntRefParam.CTYPES=pybindgen.typehandlers.inttype.IntRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.IntReturn.CTYPES=pybindgen.typehandlers.inttype.IntReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongParam.CTYPES=pybindgen.typehandlers.inttype.LongLongParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES=pybindgen.typehandlers.inttype.LongLongRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.LongLongReturn.CTYPES=pybindgen.typehandlers.inttype.LongLongReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.SizeTParam.CTYPES=pybindgen.typehandlers.inttype.SizeTParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.SizeTReturn.CTYPES=pybindgen.typehandlers.inttype.SizeTReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt16Param.CTYPES=pybindgen.typehandlers.inttype.UInt16Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt16Return.CTYPES=pybindgen.typehandlers.inttype.UInt16Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8Param.CTYPES=pybindgen.typehandlers.inttype.UInt8Param-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES=pybindgen.typehandlers.inttype.UInt8PtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UInt8Return.CTYPES=pybindgen.typehandlers.inttype.UInt8Return-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntPtrParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES=pybindgen.typehandlers.inttype.UnsignedIntReturn-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES=pybindgen.typehandlers.inttype.UnsignedLongLongReturn-class.html#CTYPES,Variable pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES=pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#CTYPES,Variable pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES=pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CStringParam.CTYPES=pybindgen.typehandlers.stringtype.CStringParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CStringReturn.CTYPES=pybindgen.typehandlers.stringtype.CStringReturn-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CharParam.CTYPES=pybindgen.typehandlers.stringtype.CharParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.CharReturn.CTYPES=pybindgen.typehandlers.stringtype.CharReturn-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringParam.CTYPES=pybindgen.typehandlers.stringtype.StdStringParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES=pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#CTYPES,Variable pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES=pybindgen.typehandlers.stringtype.StdStringReturn-class.html#CTYPES,Variable pybindgen.typehandlers.voidtype.VoidReturn.CTYPES=pybindgen.typehandlers.voidtype.VoidReturn-class.html#CTYPES"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-202', 'CTYPES', 'link-202');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L576"></a><tt class="py-lineno"> 576</tt>  <tt class="py-line">                <tt id="link-203" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-203', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L577"></a><tt class="py-lineno"> 577</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassParameter</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassParameter</tt> </tt>
<a name="L578"></a><tt class="py-lineno"> 578</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L579"></a><tt class="py-lineno"> 579</tt>  <tt class="py-line">                <tt id="link-204" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-204', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-205" class="py-name" targets="Method pybindgen.typehandlers.base.TypeMatcher.register()=pybindgen.typehandlers.base.TypeMatcher-class.html#register"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-205', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-206" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-206', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L580"></a><tt class="py-lineno"> 580</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L581"></a><tt class="py-lineno"> 581</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L582"></a><tt class="py-lineno"> 582</tt>  <tt class="py-line"> </tt>
<a name="L583"></a><tt class="py-lineno"> 583</tt>  <tt class="py-line"> </tt>
<a name="L584"></a><tt class="py-lineno"> 584</tt>  <tt class="py-line">            <tt class="py-keyword">class</tt> <tt class="py-def-name">ThisClassRefParameter</tt><tt class="py-op">(</tt><tt class="py-base-class">CppClassRefParameter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L585"></a><tt class="py-lineno"> 585</tt>  <tt class="py-line">                <tt class="py-docstring">"""Register this C++ class as pass-by-reference parameter"""</tt> </tt>
<a name="L586"></a><tt class="py-lineno"> 586</tt>  <tt class="py-line">                <tt id="link-207" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-207', 'CTYPES', 'link-202');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L587"></a><tt class="py-lineno"> 587</tt>  <tt class="py-line">                <tt id="link-208" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-208', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L588"></a><tt class="py-lineno"> 588</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassRefParameter</tt> </tt>
<a name="L589"></a><tt class="py-lineno"> 589</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L590"></a><tt class="py-lineno"> 590</tt>  <tt class="py-line">                <tt id="link-209" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-209', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-210" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-210', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-211" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-211', 'name', 'link-66');">name</a></tt><tt class="py-op">+</tt><tt class="py-string">'&amp;'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L591"></a><tt class="py-lineno"> 591</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L592"></a><tt class="py-lineno"> 592</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L593"></a><tt class="py-lineno"> 593</tt>  <tt class="py-line"> </tt>
<a name="L594"></a><tt class="py-lineno"> 594</tt>  <tt class="py-line">            <tt class="py-keyword">class</tt> <tt class="py-def-name">ThisClassReturn</tt><tt class="py-op">(</tt><tt class="py-base-class">CppClassReturnValue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L595"></a><tt class="py-lineno"> 595</tt>  <tt class="py-line">                <tt class="py-docstring">"""Register this C++ class as value return"""</tt> </tt>
<a name="L596"></a><tt class="py-lineno"> 596</tt>  <tt class="py-line">                <tt id="link-212" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-212', 'CTYPES', 'link-202');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L597"></a><tt class="py-lineno"> 597</tt>  <tt class="py-line">                <tt id="link-213" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-213', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L598"></a><tt class="py-lineno"> 598</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassReturn</tt> </tt>
<a name="L599"></a><tt class="py-lineno"> 599</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefReturn</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassReturn</tt> </tt>
<a name="L600"></a><tt class="py-lineno"> 600</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L601"></a><tt class="py-lineno"> 601</tt>  <tt class="py-line">                <tt id="link-214" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-214', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-215" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-215', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-216" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-216', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">)</tt> </tt>
<a name="L602"></a><tt class="py-lineno"> 602</tt>  <tt class="py-line">                <tt id="link-217" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-217', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-218', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-219" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-219', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefReturn</tt><tt class="py-op">)</tt> </tt>
<a name="L603"></a><tt class="py-lineno"> 603</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L604"></a><tt class="py-lineno"> 604</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L605"></a><tt class="py-lineno"> 605</tt>  <tt class="py-line"> </tt>
<a name="L606"></a><tt class="py-lineno"> 606</tt>  <tt class="py-line">            <tt class="py-keyword">class</tt> <tt class="py-def-name">ThisClassPtrParameter</tt><tt class="py-op">(</tt><tt class="py-base-class">CppClassPtrParameter</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L607"></a><tt class="py-lineno"> 607</tt>  <tt class="py-line">                <tt class="py-docstring">"""Register this C++ class as pass-by-pointer parameter"""</tt> </tt>
<a name="L608"></a><tt class="py-lineno"> 608</tt>  <tt class="py-line">                <tt id="link-220" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-220', 'CTYPES', 'link-202');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L609"></a><tt class="py-lineno"> 609</tt>  <tt class="py-line">                <tt id="link-221" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-221', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L610"></a><tt class="py-lineno"> 610</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrParameter</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassPtrParameter</tt> </tt>
<a name="L611"></a><tt class="py-lineno"> 611</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L612"></a><tt class="py-lineno"> 612</tt>  <tt class="py-line">                <tt id="link-222" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-222', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-223" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-223', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-224" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-224', 'name', 'link-66');">name</a></tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L613"></a><tt class="py-lineno"> 613</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L614"></a><tt class="py-lineno"> 614</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L615"></a><tt class="py-lineno"> 615</tt>  <tt class="py-line"> </tt>
<a name="L616"></a><tt class="py-lineno"> 616</tt>  <tt class="py-line">            <tt class="py-keyword">class</tt> <tt class="py-def-name">ThisClassPtrReturn</tt><tt class="py-op">(</tt><tt class="py-base-class">CppClassPtrReturnValue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L617"></a><tt class="py-lineno"> 617</tt>  <tt class="py-line">                <tt class="py-docstring">"""Register this C++ class as pointer return"""</tt> </tt>
<a name="L618"></a><tt class="py-lineno"> 618</tt>  <tt class="py-line">                <tt id="link-225" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-225', 'CTYPES', 'link-202');">CTYPES</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L619"></a><tt class="py-lineno"> 619</tt>  <tt class="py-line">                <tt id="link-226" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-226', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
</div><a name="L620"></a><tt class="py-lineno"> 620</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrReturn</tt> <tt class="py-op">=</tt> <tt class="py-name">ThisClassPtrReturn</tt> </tt>
<a name="L621"></a><tt class="py-lineno"> 621</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L622"></a><tt class="py-lineno"> 622</tt>  <tt class="py-line">                <tt id="link-227" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-227', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-228" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-228', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt id="link-229" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-229', 'name', 'link-66');">name</a></tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrReturn</tt><tt class="py-op">)</tt> </tt>
<a name="L623"></a><tt class="py-lineno"> 623</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L624"></a><tt class="py-lineno"> 624</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
</div><a name="L625"></a><tt class="py-lineno"> 625</tt>  <tt class="py-line"> </tt>
<a name="CppClass.__repr__"></a><div id="CppClass.__repr__-def"><a name="L626"></a><tt class="py-lineno"> 626</tt> <a class="py-toggle" href="#" id="CppClass.__repr__-toggle" onclick="return toggle('CppClass.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.__repr__-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.__repr__-expanded"><a name="L627"></a><tt class="py-lineno"> 627</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;pybindgen.CppClass %r&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> </tt>
</div><a name="L628"></a><tt class="py-lineno"> 628</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_binary_comparison_operator"></a><div id="CppClass.add_binary_comparison_operator-def"><a name="L629"></a><tt class="py-lineno"> 629</tt> <a class="py-toggle" href="#" id="CppClass.add_binary_comparison_operator-toggle" onclick="return toggle('CppClass.add_binary_comparison_operator');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_binary_comparison_operator">add_binary_comparison_operator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">operator</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_binary_comparison_operator-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_binary_comparison_operator-expanded"><a name="L630"></a><tt class="py-lineno"> 630</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L631"></a><tt class="py-lineno"> 631</tt>  <tt class="py-line"><tt class="py-docstring">        Add support for a C++ binary comparison operator, such as == or &lt;.</tt> </tt>
<a name="L632"></a><tt class="py-lineno"> 632</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L633"></a><tt class="py-lineno"> 633</tt>  <tt class="py-line"><tt class="py-docstring">        The binary operator is assumed to operate with both operands</tt> </tt>
<a name="L634"></a><tt class="py-lineno"> 634</tt>  <tt class="py-line"><tt class="py-docstring">        of the type of the class, either by reference or by value.</tt> </tt>
<a name="L635"></a><tt class="py-lineno"> 635</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<a name="L636"></a><tt class="py-lineno"> 636</tt>  <tt class="py-line"><tt class="py-docstring">        @param operator: string indicating the name of the operator to</tt> </tt>
<a name="L637"></a><tt class="py-lineno"> 637</tt>  <tt class="py-line"><tt class="py-docstring">        support, e.g. '=='</tt> </tt>
<a name="L638"></a><tt class="py-lineno"> 638</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L639"></a><tt class="py-lineno"> 639</tt>  <tt class="py-line">        <tt class="py-name">operator</tt> <tt class="py-op">=</tt> <tt id="link-230" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-230', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-231" class="py-name" targets="Function pybindgen.utils.ascii()=pybindgen.utils-module.html#ascii"><a title="pybindgen.utils.ascii" class="py-name" href="#" onclick="return doclink('link-231', 'ascii', 'link-231');">ascii</a></tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">)</tt> </tt>
<a name="L640"></a><tt class="py-lineno"> 640</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L641"></a><tt class="py-lineno"> 641</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"expected operator name as string"</tt><tt class="py-op">)</tt> </tt>
<a name="L642"></a><tt class="py-lineno"> 642</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">operator</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'=='</tt><tt class="py-op">,</tt> <tt class="py-string">'!='</tt><tt class="py-op">,</tt> <tt class="py-string">'&lt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'&lt;='</tt><tt class="py-op">,</tt> <tt class="py-string">'&gt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'&gt;='</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L643"></a><tt class="py-lineno"> 643</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The operator %r is invalid or not yet supported by PyBindGen"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L644"></a><tt class="py-lineno"> 644</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_comparison_operators</tt><tt class="py-op">.</tt><tt id="link-232" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-232', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">)</tt> </tt>
</div><a name="L645"></a><tt class="py-lineno"> 645</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_binary_numeric_operator"></a><div id="CppClass.add_binary_numeric_operator-def"><a name="L646"></a><tt class="py-lineno"> 646</tt> <a class="py-toggle" href="#" id="CppClass.add_binary_numeric_operator-toggle" onclick="return toggle('CppClass.add_binary_numeric_operator');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_binary_numeric_operator">add_binary_numeric_operator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">operator</tt><tt class="py-op">,</tt> <tt class="py-param">result_cppclass</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
<a name="L647"></a><tt class="py-lineno"> 647</tt>  <tt class="py-line">                                    <tt class="py-param">left_cppclass</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">right_cppclass</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_binary_numeric_operator-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_binary_numeric_operator-expanded"><a name="L648"></a><tt class="py-lineno"> 648</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L649"></a><tt class="py-lineno"> 649</tt>  <tt class="py-line"><tt class="py-docstring">        Add support for a C++ binary numeric operator, such as +, -, *, or /.</tt> </tt>
<a name="L650"></a><tt class="py-lineno"> 650</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L651"></a><tt class="py-lineno"> 651</tt>  <tt class="py-line"><tt class="py-docstring">        @param operator: string indicating the name of the operator to</tt> </tt>
<a name="L652"></a><tt class="py-lineno"> 652</tt>  <tt class="py-line"><tt class="py-docstring">        support, e.g. '=='</tt> </tt>
<a name="L653"></a><tt class="py-lineno"> 653</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L654"></a><tt class="py-lineno"> 654</tt>  <tt class="py-line"><tt class="py-docstring">        @param result_cppclass: the CppClass object of the result type, assumed to be this class if omitted</tt> </tt>
<a name="L655"></a><tt class="py-lineno"> 655</tt>  <tt class="py-line"><tt class="py-docstring">        @param left_cppclass: the CppClass object of the left operand type, assumed to be this class if omitted</tt> </tt>
<a name="L656"></a><tt class="py-lineno"> 656</tt>  <tt class="py-line"><tt class="py-docstring">        @param right_cppclass: the CppClass object of the right operand type, assumed to be this class if omitted</tt> </tt>
<a name="L657"></a><tt class="py-lineno"> 657</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L658"></a><tt class="py-lineno"> 658</tt>  <tt class="py-line">        <tt class="py-name">operator</tt> <tt class="py-op">=</tt> <tt id="link-233" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-233', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-234" class="py-name"><a title="pybindgen.utils.ascii" class="py-name" href="#" onclick="return doclink('link-234', 'ascii', 'link-231');">ascii</a></tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">)</tt> </tt>
<a name="L659"></a><tt class="py-lineno"> 659</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L660"></a><tt class="py-lineno"> 660</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"expected operator name as string"</tt><tt class="py-op">)</tt> </tt>
<a name="L661"></a><tt class="py-lineno"> 661</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">operator</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'+'</tt><tt class="py-op">,</tt> <tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L662"></a><tt class="py-lineno"> 662</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The operator %r is invalid or not yet supported by PyBindGen"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L663"></a><tt class="py-lineno"> 663</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L664"></a><tt class="py-lineno"> 664</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">operator</tt><tt class="py-op">]</tt> </tt>
<a name="L665"></a><tt class="py-lineno"> 665</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L666"></a><tt class="py-lineno"> 666</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L667"></a><tt class="py-lineno"> 667</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">operator</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt> </tt>
<a name="L668"></a><tt class="py-lineno"> 668</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">result_cppclass</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L669"></a><tt class="py-lineno"> 669</tt>  <tt class="py-line">            <tt class="py-name">result_cppclass</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L670"></a><tt class="py-lineno"> 670</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">left_cppclass</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L671"></a><tt class="py-lineno"> 671</tt>  <tt class="py-line">            <tt class="py-name">left_cppclass</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L672"></a><tt class="py-lineno"> 672</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">right_cppclass</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L673"></a><tt class="py-lineno"> 673</tt>  <tt class="py-line">            <tt class="py-name">right_cppclass</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L674"></a><tt class="py-lineno"> 674</tt>  <tt class="py-line">        <tt class="py-name">op</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">result_cppclass</tt><tt class="py-op">,</tt> <tt class="py-name">left_cppclass</tt><tt class="py-op">,</tt> <tt class="py-name">right_cppclass</tt><tt class="py-op">)</tt> </tt>
<a name="L675"></a><tt class="py-lineno"> 675</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">op</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">l</tt><tt class="py-op">:</tt> </tt>
<a name="L676"></a><tt class="py-lineno"> 676</tt>  <tt class="py-line">            <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">op</tt><tt class="py-op">)</tt> </tt>
</div><a name="L677"></a><tt class="py-lineno"> 677</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_inplace_numeric_operator"></a><div id="CppClass.add_inplace_numeric_operator-def"><a name="L678"></a><tt class="py-lineno"> 678</tt> <a class="py-toggle" href="#" id="CppClass.add_inplace_numeric_operator-toggle" onclick="return toggle('CppClass.add_inplace_numeric_operator');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_inplace_numeric_operator">add_inplace_numeric_operator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">operator</tt><tt class="py-op">,</tt> <tt class="py-param">right_cppclass</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_inplace_numeric_operator-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_inplace_numeric_operator-expanded"><a name="L679"></a><tt class="py-lineno"> 679</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L680"></a><tt class="py-lineno"> 680</tt>  <tt class="py-line"><tt class="py-docstring">        Add support for a C++ inplace numeric operator, such as +=, -=, *=, or /=.</tt> </tt>
<a name="L681"></a><tt class="py-lineno"> 681</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L682"></a><tt class="py-lineno"> 682</tt>  <tt class="py-line"><tt class="py-docstring">        @param operator: string indicating the name of the operator to</tt> </tt>
<a name="L683"></a><tt class="py-lineno"> 683</tt>  <tt class="py-line"><tt class="py-docstring">        support, e.g. '+='</tt> </tt>
<a name="L684"></a><tt class="py-lineno"> 684</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L685"></a><tt class="py-lineno"> 685</tt>  <tt class="py-line"><tt class="py-docstring">        @param right_cppclass: the CppClass object of the right operand type, assumed to be this class if omitted</tt> </tt>
<a name="L686"></a><tt class="py-lineno"> 686</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L687"></a><tt class="py-lineno"> 687</tt>  <tt class="py-line">        <tt class="py-name">operator</tt> <tt class="py-op">=</tt> <tt id="link-235" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-235', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-236" class="py-name"><a title="pybindgen.utils.ascii" class="py-name" href="#" onclick="return doclink('link-236', 'ascii', 'link-231');">ascii</a></tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">)</tt> </tt>
<a name="L688"></a><tt class="py-lineno"> 688</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L689"></a><tt class="py-lineno"> 689</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"expected operator name as string"</tt><tt class="py-op">)</tt> </tt>
<a name="L690"></a><tt class="py-lineno"> 690</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">operator</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'+='</tt><tt class="py-op">,</tt> <tt class="py-string">'-='</tt><tt class="py-op">,</tt> <tt class="py-string">'*='</tt><tt class="py-op">,</tt> <tt class="py-string">'/='</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L691"></a><tt class="py-lineno"> 691</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">(</tt><tt class="py-string">"The operator %r is invalid or not yet supported by PyBindGen"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">operator</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L692"></a><tt class="py-lineno"> 692</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L693"></a><tt class="py-lineno"> 693</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">operator</tt><tt class="py-op">]</tt> </tt>
<a name="L694"></a><tt class="py-lineno"> 694</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L695"></a><tt class="py-lineno"> 695</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L696"></a><tt class="py-lineno"> 696</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">operator</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">l</tt> </tt>
<a name="L697"></a><tt class="py-lineno"> 697</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">right_cppclass</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L698"></a><tt class="py-lineno"> 698</tt>  <tt class="py-line">            <tt class="py-name">right_cppclass</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L699"></a><tt class="py-lineno"> 699</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">right_cppclass</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">l</tt><tt class="py-op">:</tt> </tt>
<a name="L700"></a><tt class="py-lineno"> 700</tt>  <tt class="py-line">            <tt class="py-name">l</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">right_cppclass</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L701"></a><tt class="py-lineno"> 701</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_class"></a><div id="CppClass.add_class-def"><a name="L702"></a><tt class="py-lineno"> 702</tt> <a class="py-toggle" href="#" id="CppClass.add_class-toggle" onclick="return toggle('CppClass.add_class');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_class">add_class</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_class-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_class-expanded"><a name="L703"></a><tt class="py-lineno"> 703</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L704"></a><tt class="py-lineno"> 704</tt>  <tt class="py-line"><tt class="py-docstring">        Add a nested class.  See L{CppClass} for information about accepted parameters.</tt> </tt>
<a name="L705"></a><tt class="py-lineno"> 705</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L706"></a><tt class="py-lineno"> 706</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-string">'outer_class'</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt> </tt>
<a name="L707"></a><tt class="py-lineno"> 707</tt>  <tt class="py-line">        <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'outer_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L708"></a><tt class="py-lineno"> 708</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-237" class="py-name" targets="Variable pybindgen.container.Container.module=pybindgen.container.Container-class.html#module,Variable pybindgen.cppclass.CppClass.module=pybindgen.cppclass.CppClass-class.html#module,Variable pybindgen.enum.Enum.module=pybindgen.enum.Enum-class.html#module,Variable pybindgen.function.Function.module=pybindgen.function.Function-class.html#module,Module pybindgen.module=pybindgen.module-module.html"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-237', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-238" class="py-name" targets="Method pybindgen.cppclass.CppClass.add_class()=pybindgen.cppclass.CppClass-class.html#add_class,Method pybindgen.module.ModuleBase.add_class()=pybindgen.module.ModuleBase-class.html#add_class"><a title="pybindgen.cppclass.CppClass.add_class
pybindgen.module.ModuleBase.add_class" class="py-name" href="#" onclick="return doclink('link-238', 'add_class', 'link-238');">add_class</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L709"></a><tt class="py-lineno"> 709</tt>  <tt class="py-line"> </tt>
<a name="L710"></a><tt class="py-lineno"> 710</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_enum"></a><div id="CppClass.add_enum-def"><a name="L711"></a><tt class="py-lineno"> 711</tt> <a class="py-toggle" href="#" id="CppClass.add_enum-toggle" onclick="return toggle('CppClass.add_enum');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_enum">add_enum</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_enum-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_enum-expanded"><a name="L712"></a><tt class="py-lineno"> 712</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L713"></a><tt class="py-lineno"> 713</tt>  <tt class="py-line"><tt class="py-docstring">        Add a nested enum.  See L{Enum} for information about accepted parameters.</tt> </tt>
<a name="L714"></a><tt class="py-lineno"> 714</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L715"></a><tt class="py-lineno"> 715</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-string">'outer_class'</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt> </tt>
<a name="L716"></a><tt class="py-lineno"> 716</tt>  <tt class="py-line">        <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'outer_class'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L717"></a><tt class="py-lineno"> 717</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-239" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-239', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-240" class="py-name" targets="Method pybindgen.cppclass.CppClass.add_enum()=pybindgen.cppclass.CppClass-class.html#add_enum,Method pybindgen.module.ModuleBase.add_enum()=pybindgen.module.ModuleBase-class.html#add_enum"><a title="pybindgen.cppclass.CppClass.add_enum
pybindgen.module.ModuleBase.add_enum" class="py-name" href="#" onclick="return doclink('link-240', 'add_enum', 'link-240');">add_enum</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
</div><a name="L718"></a><tt class="py-lineno"> 718</tt>  <tt class="py-line"> </tt>
<a name="L719"></a><tt class="py-lineno"> 719</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_mro"></a><div id="CppClass.get_mro-def"><a name="L720"></a><tt class="py-lineno"> 720</tt> <a class="py-toggle" href="#" id="CppClass.get_mro-toggle" onclick="return toggle('CppClass.get_mro');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_mro">get_mro</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_mro-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_mro-expanded"><a name="L721"></a><tt class="py-lineno"> 721</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L722"></a><tt class="py-lineno"> 722</tt>  <tt class="py-line"><tt class="py-docstring">        Get the method resolution order (MRO) of this class.</tt> </tt>
<a name="L723"></a><tt class="py-lineno"> 723</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L724"></a><tt class="py-lineno"> 724</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an iterator that gives CppClass objects, from leaf to root class</tt> </tt>
<a name="L725"></a><tt class="py-lineno"> 725</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L726"></a><tt class="py-lineno"> 726</tt>  <tt class="py-line">        <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L727"></a><tt class="py-lineno"> 727</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L728"></a><tt class="py-lineno"> 728</tt>  <tt class="py-line">            <tt class="py-keyword">yield</tt> <tt class="py-name">cls</tt> </tt>
<a name="L729"></a><tt class="py-lineno"> 729</tt>  <tt class="py-line">            <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
</div><a name="L730"></a><tt class="py-lineno"> 730</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_all_methods"></a><div id="CppClass.get_all_methods-def"><a name="L731"></a><tt class="py-lineno"> 731</tt> <a class="py-toggle" href="#" id="CppClass.get_all_methods-toggle" onclick="return toggle('CppClass.get_all_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_all_methods">get_all_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_all_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_all_methods-expanded"><a name="L732"></a><tt class="py-lineno"> 732</tt>  <tt class="py-line">        <tt class="py-docstring">"""Returns an iterator to iterate over all methods of the class"""</tt> </tt>
<a name="L733"></a><tt class="py-lineno"> 733</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">overload</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">.</tt><tt class="py-name">itervalues</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L734"></a><tt class="py-lineno"> 734</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">wrappers</tt><tt class="py-op">:</tt> </tt>
<a name="L735"></a><tt class="py-lineno"> 735</tt>  <tt class="py-line">                <tt class="py-keyword">yield</tt> <tt class="py-name">method</tt> </tt>
<a name="L736"></a><tt class="py-lineno"> 736</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nonpublic_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L737"></a><tt class="py-lineno"> 737</tt>  <tt class="py-line">            <tt class="py-keyword">yield</tt> <tt class="py-name">method</tt> </tt>
</div><a name="L738"></a><tt class="py-lineno"> 738</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_have_pure_virtual_methods"></a><div id="CppClass.get_have_pure_virtual_methods-def"><a name="L739"></a><tt class="py-lineno"> 739</tt> <a class="py-toggle" href="#" id="CppClass.get_have_pure_virtual_methods-toggle" onclick="return toggle('CppClass.get_have_pure_virtual_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_have_pure_virtual_methods">get_have_pure_virtual_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_have_pure_virtual_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_have_pure_virtual_methods-expanded"><a name="L740"></a><tt class="py-lineno"> 740</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L741"></a><tt class="py-lineno"> 741</tt>  <tt class="py-line"><tt class="py-docstring">        Returns True if the class has pure virtual methods with no</tt> </tt>
<a name="L742"></a><tt class="py-lineno"> 742</tt>  <tt class="py-line"><tt class="py-docstring">        implementation (which would mean the type is not instantiable</tt> </tt>
<a name="L743"></a><tt class="py-lineno"> 743</tt>  <tt class="py-line"><tt class="py-docstring">        directly, only through a helper class).</tt> </tt>
<a name="L744"></a><tt class="py-lineno"> 744</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L745"></a><tt class="py-lineno"> 745</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L746"></a><tt class="py-lineno"> 746</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> </tt>
<a name="L747"></a><tt class="py-lineno"> 747</tt>  <tt class="py-line">        <tt class="py-name">mro</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-241" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_mro()=pybindgen.cppclass.CppClass-class.html#get_mro"><a title="pybindgen.cppclass.CppClass.get_mro" class="py-name" href="#" onclick="return doclink('link-241', 'get_mro', 'link-241');">get_mro</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L748"></a><tt class="py-lineno"> 748</tt>  <tt class="py-line">        <tt class="py-name">mro_reversed</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">mro</tt><tt class="py-op">)</tt> </tt>
<a name="L749"></a><tt class="py-lineno"> 749</tt>  <tt class="py-line">        <tt class="py-name">mro_reversed</tt><tt class="py-op">.</tt><tt class="py-name">reverse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L750"></a><tt class="py-lineno"> 750</tt>  <tt class="py-line"> </tt>
<a name="L751"></a><tt class="py-lineno"> 751</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L752"></a><tt class="py-lineno"> 752</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">pos</tt><tt class="py-op">,</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt class="py-name">mro_reversed</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L753"></a><tt class="py-lineno"> 753</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-242" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_all_methods()=pybindgen.cppclass.CppClass-class.html#get_all_methods"><a title="pybindgen.cppclass.CppClass.get_all_methods" class="py-name" href="#" onclick="return doclink('link-242', 'get_all_methods', 'link-242');">get_all_methods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">_dummy_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L754"></a><tt class="py-lineno"> 754</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-243" class="py-name" targets="Class pybindgen.cppmethod.CppMethod=pybindgen.cppmethod.CppMethod-class.html"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-243', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L755"></a><tt class="py-lineno"> 755</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L756"></a><tt class="py-lineno"> 756</tt>  <tt class="py-line"> </tt>
<a name="L757"></a><tt class="py-lineno"> 757</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L758"></a><tt class="py-lineno"> 758</tt>  <tt class="py-line">                    <tt class="py-comment">## found a pure virtual method; now go see in the</tt> </tt>
<a name="L759"></a><tt class="py-lineno"> 759</tt>  <tt class="py-line">                    <tt class="py-comment">## child classes, check if any of them implements</tt> </tt>
<a name="L760"></a><tt class="py-lineno"> 760</tt>  <tt class="py-line">                    <tt class="py-comment">## this pure virtual method.</tt> </tt>
<a name="L761"></a><tt class="py-lineno"> 761</tt>  <tt class="py-line">                    <tt class="py-name">implemented</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L762"></a><tt class="py-lineno"> 762</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">child_cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mro_reversed</tt><tt class="py-op">[</tt><tt class="py-name">pos</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L763"></a><tt class="py-lineno"> 763</tt>  <tt class="py-line">                        <tt class="py-keyword">for</tt> <tt class="py-name">child_method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">child_cls</tt><tt class="py-op">.</tt><tt id="link-244" class="py-name"><a title="pybindgen.cppclass.CppClass.get_all_methods" class="py-name" href="#" onclick="return doclink('link-244', 'get_all_methods', 'link-242');">get_all_methods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">child_cls</tt><tt class="py-op">.</tt><tt class="py-name">_dummy_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L764"></a><tt class="py-lineno"> 764</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">child_method</tt><tt class="py-op">,</tt> <tt id="link-245" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-245', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L765"></a><tt class="py-lineno"> 765</tt>  <tt class="py-line">                                <tt class="py-keyword">continue</tt> </tt>
<a name="L766"></a><tt class="py-lineno"> 766</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">child_method</tt><tt class="py-op">.</tt><tt class="py-name">is_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L767"></a><tt class="py-lineno"> 767</tt>  <tt class="py-line">                                <tt class="py-keyword">continue</tt> </tt>
<a name="L768"></a><tt class="py-lineno"> 768</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">child_method</tt><tt class="py-op">.</tt><tt id="link-246" class="py-name"><a title="pybindgen.cppmethod.CppMethod.matches_signature" class="py-name" href="#" onclick="return doclink('link-246', 'matches_signature', 'link-70');">matches_signature</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L769"></a><tt class="py-lineno"> 769</tt>  <tt class="py-line">                                <tt class="py-keyword">continue</tt> </tt>
<a name="L770"></a><tt class="py-lineno"> 770</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">child_method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L771"></a><tt class="py-lineno"> 771</tt>  <tt class="py-line">                                <tt class="py-name">implemented</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L772"></a><tt class="py-lineno"> 772</tt>  <tt class="py-line">                            <tt class="py-keyword">break</tt> </tt>
<a name="L773"></a><tt class="py-lineno"> 773</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">implemented</tt><tt class="py-op">:</tt> </tt>
<a name="L774"></a><tt class="py-lineno"> 774</tt>  <tt class="py-line">                            <tt class="py-keyword">break</tt> </tt>
<a name="L775"></a><tt class="py-lineno"> 775</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">implemented</tt><tt class="py-op">:</tt> </tt>
<a name="L776"></a><tt class="py-lineno"> 776</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L777"></a><tt class="py-lineno"> 777</tt>  <tt class="py-line"> </tt>
<a name="L778"></a><tt class="py-lineno"> 778</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> </tt>
</div><a name="L779"></a><tt class="py-lineno"> 779</tt>  <tt class="py-line">                             </tt>
<a name="L780"></a><tt class="py-lineno"> 780</tt>  <tt class="py-line">    <tt id="link-247" class="py-name" targets="Variable pybindgen.cppclass.CppClass.have_pure_virtual_methods=pybindgen.cppclass.CppClass-class.html#have_pure_virtual_methods"><a title="pybindgen.cppclass.CppClass.have_pure_virtual_methods" class="py-name" href="#" onclick="return doclink('link-247', 'have_pure_virtual_methods', 'link-247');">have_pure_virtual_methods</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-248" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_have_pure_virtual_methods()=pybindgen.cppclass.CppClass-class.html#get_have_pure_virtual_methods"><a title="pybindgen.cppclass.CppClass.get_have_pure_virtual_methods" class="py-name" href="#" onclick="return doclink('link-248', 'get_have_pure_virtual_methods', 'link-248');">get_have_pure_virtual_methods</a></tt><tt class="py-op">)</tt> </tt>
<a name="L781"></a><tt class="py-lineno"> 781</tt>  <tt class="py-line"> </tt>
<a name="L782"></a><tt class="py-lineno"> 782</tt>  <tt class="py-line"> </tt>
<a name="CppClass.is_subclass"></a><div id="CppClass.is_subclass-def"><a name="L783"></a><tt class="py-lineno"> 783</tt> <a class="py-toggle" href="#" id="CppClass.is_subclass-toggle" onclick="return toggle('CppClass.is_subclass');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#is_subclass">is_subclass</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.is_subclass-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.is_subclass-expanded"><a name="L784"></a><tt class="py-lineno"> 784</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return True if this CppClass instance represents a class that is a</tt> </tt>
<a name="L785"></a><tt class="py-lineno"> 785</tt>  <tt class="py-line"><tt class="py-docstring">        subclass of another class represented by the CppClasss object `other'."""</tt> </tt>
<a name="L786"></a><tt class="py-lineno"> 786</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt id="link-249" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-249', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L787"></a><tt class="py-lineno"> 787</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt> </tt>
<a name="L788"></a><tt class="py-lineno"> 788</tt>  <tt class="py-line">        <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L789"></a><tt class="py-lineno"> 789</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L790"></a><tt class="py-lineno"> 790</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt class="py-name">other</tt><tt class="py-op">:</tt> </tt>
<a name="L791"></a><tt class="py-lineno"> 791</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L792"></a><tt class="py-lineno"> 792</tt>  <tt class="py-line">            <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
<a name="L793"></a><tt class="py-lineno"> 793</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L794"></a><tt class="py-lineno"> 794</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_helper_class_hook"></a><div id="CppClass.add_helper_class_hook-def"><a name="L795"></a><tt class="py-lineno"> 795</tt> <a class="py-toggle" href="#" id="CppClass.add_helper_class_hook-toggle" onclick="return toggle('CppClass.add_helper_class_hook');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_helper_class_hook">add_helper_class_hook</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">hook</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_helper_class_hook-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_helper_class_hook-expanded"><a name="L796"></a><tt class="py-lineno"> 796</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L797"></a><tt class="py-lineno"> 797</tt>  <tt class="py-line"><tt class="py-docstring">        Add a hook function to be called just prior to a helper class</tt> </tt>
<a name="L798"></a><tt class="py-lineno"> 798</tt>  <tt class="py-line"><tt class="py-docstring">        being generated.  The hook function applies to this class and</tt> </tt>
<a name="L799"></a><tt class="py-lineno"> 799</tt>  <tt class="py-line"><tt class="py-docstring">        all subclasses.  The hook function is called like this::</tt> </tt>
<a name="L800"></a><tt class="py-lineno"> 800</tt>  <tt class="py-line"><tt class="py-docstring">          hook_function(helper_class)</tt> </tt>
<a name="L801"></a><tt class="py-lineno"> 801</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L802"></a><tt class="py-lineno"> 802</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">hook</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L803"></a><tt class="py-lineno"> 803</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"hook function must be callable"</tt><tt class="py-op">)</tt> </tt>
<a name="L804"></a><tt class="py-lineno"> 804</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_hooks</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">hook</tt><tt class="py-op">)</tt> </tt>
</div><a name="L805"></a><tt class="py-lineno"> 805</tt>  <tt class="py-line">         </tt>
<a name="CppClass._get_all_helper_class_hooks"></a><div id="CppClass._get_all_helper_class_hooks-def"><a name="L806"></a><tt class="py-lineno"> 806</tt> <a class="py-toggle" href="#" id="CppClass._get_all_helper_class_hooks-toggle" onclick="return toggle('CppClass._get_all_helper_class_hooks');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_get_all_helper_class_hooks">_get_all_helper_class_hooks</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._get_all_helper_class_hooks-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._get_all_helper_class_hooks-expanded"><a name="L807"></a><tt class="py-lineno"> 807</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L808"></a><tt class="py-lineno"> 808</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of all helper class hook functions, including</tt> </tt>
<a name="L809"></a><tt class="py-lineno"> 809</tt>  <tt class="py-line"><tt class="py-docstring">        the ones registered with parent classes.  Parent hooks will</tt> </tt>
<a name="L810"></a><tt class="py-lineno"> 810</tt>  <tt class="py-line"><tt class="py-docstring">        appear first in the list.</tt> </tt>
<a name="L811"></a><tt class="py-lineno"> 811</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L812"></a><tt class="py-lineno"> 812</tt>  <tt class="py-line">        <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L813"></a><tt class="py-lineno"> 813</tt>  <tt class="py-line">        <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L814"></a><tt class="py-lineno"> 814</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L815"></a><tt class="py-lineno"> 815</tt>  <tt class="py-line">            <tt class="py-name">l</tt> <tt class="py-op">=</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_hooks</tt> <tt class="py-op">+</tt> <tt class="py-name">l</tt> </tt>
<a name="L816"></a><tt class="py-lineno"> 816</tt>  <tt class="py-line">            <tt class="py-name">cls</tt> <tt class="py-op">=</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
<a name="L817"></a><tt class="py-lineno"> 817</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">l</tt> </tt>
</div><a name="L818"></a><tt class="py-lineno"> 818</tt>  <tt class="py-line"> </tt>
<a name="CppClass.set_instance_creation_function"></a><div id="CppClass.set_instance_creation_function-def"><a name="L819"></a><tt class="py-lineno"> 819</tt> <a class="py-toggle" href="#" id="CppClass.set_instance_creation_function-toggle" onclick="return toggle('CppClass.set_instance_creation_function');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#set_instance_creation_function">set_instance_creation_function</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">instance_creation_function</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.set_instance_creation_function-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.set_instance_creation_function-expanded"><a name="L820"></a><tt class="py-lineno"> 820</tt>  <tt class="py-line">        <tt class="py-docstring">"""Set a custom function to be called to create instances of this</tt> </tt>
<a name="L821"></a><tt class="py-lineno"> 821</tt>  <tt class="py-line"><tt class="py-docstring">        class and its subclasses.</tt> </tt>
<a name="L822"></a><tt class="py-lineno"> 822</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L823"></a><tt class="py-lineno"> 823</tt>  <tt class="py-line"><tt class="py-docstring">        @param instance_creation_function: instance creation function; see</tt> </tt>
<a name="L824"></a><tt class="py-lineno"> 824</tt>  <tt class="py-line"><tt class="py-docstring">                                      default_instance_creation_function()</tt> </tt>
<a name="L825"></a><tt class="py-lineno"> 825</tt>  <tt class="py-line"><tt class="py-docstring">                                      for signature and example.</tt> </tt>
<a name="L826"></a><tt class="py-lineno"> 826</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L827"></a><tt class="py-lineno"> 827</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_creation_function</tt> <tt class="py-op">=</tt> <tt class="py-name">instance_creation_function</tt> </tt>
</div><a name="L828"></a><tt class="py-lineno"> 828</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_instance_creation_function"></a><div id="CppClass.get_instance_creation_function-def"><a name="L829"></a><tt class="py-lineno"> 829</tt> <a class="py-toggle" href="#" id="CppClass.get_instance_creation_function-toggle" onclick="return toggle('CppClass.get_instance_creation_function');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_instance_creation_function">get_instance_creation_function</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_instance_creation_function-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_instance_creation_function-expanded"><a name="L830"></a><tt class="py-lineno"> 830</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_creation_function</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L831"></a><tt class="py-lineno"> 831</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L832"></a><tt class="py-lineno"> 832</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt id="link-250" class="py-name" targets="Function pybindgen.cppclass.default_instance_creation_function()=pybindgen.cppclass-module.html#default_instance_creation_function"><a title="pybindgen.cppclass.default_instance_creation_function" class="py-name" href="#" onclick="return doclink('link-250', 'default_instance_creation_function', 'link-250');">default_instance_creation_function</a></tt> </tt>
<a name="L833"></a><tt class="py-lineno"> 833</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L834"></a><tt class="py-lineno"> 834</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-251" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_instance_creation_function()=pybindgen.cppclass.CppClass-class.html#get_instance_creation_function"><a title="pybindgen.cppclass.CppClass.get_instance_creation_function" class="py-name" href="#" onclick="return doclink('link-251', 'get_instance_creation_function', 'link-251');">get_instance_creation_function</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L835"></a><tt class="py-lineno"> 835</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L836"></a><tt class="py-lineno"> 836</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_creation_function</tt> </tt>
</div><a name="L837"></a><tt class="py-lineno"> 837</tt>  <tt class="py-line"> </tt>
<a name="CppClass.write_create_instance"></a><div id="CppClass.write_create_instance-def"><a name="L838"></a><tt class="py-lineno"> 838</tt> <a class="py-toggle" href="#" id="CppClass.write_create_instance-toggle" onclick="return toggle('CppClass.write_create_instance');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#write_create_instance">write_create_instance</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_block</tt><tt class="py-op">,</tt> <tt class="py-param">lvalue</tt><tt class="py-op">,</tt> <tt class="py-param">parameters</tt><tt class="py-op">,</tt> <tt class="py-param">construct_type_name</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.write_create_instance-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.write_create_instance-expanded"><a name="L839"></a><tt class="py-lineno"> 839</tt>  <tt class="py-line">        <tt class="py-name">instance_creation_func</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-252" class="py-name"><a title="pybindgen.cppclass.CppClass.get_instance_creation_function" class="py-name" href="#" onclick="return doclink('link-252', 'get_instance_creation_function', 'link-251');">get_instance_creation_function</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L840"></a><tt class="py-lineno"> 840</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">construct_type_name</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L841"></a><tt class="py-lineno"> 841</tt>  <tt class="py-line">            <tt class="py-name">construct_type_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-253" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_construct_name()=pybindgen.cppclass.CppClass-class.html#get_construct_name"><a title="pybindgen.cppclass.CppClass.get_construct_name" class="py-name" href="#" onclick="return doclink('link-253', 'get_construct_name', 'link-253');">get_construct_name</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L842"></a><tt class="py-lineno"> 842</tt>  <tt class="py-line">        <tt class="py-name">instance_creation_func</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-254" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-254', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">,</tt> <tt class="py-name">lvalue</tt><tt class="py-op">,</tt> <tt class="py-name">parameters</tt><tt class="py-op">,</tt> <tt class="py-name">construct_type_name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L843"></a><tt class="py-lineno"> 843</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_pystruct"></a><div id="CppClass.get_pystruct-def"><a name="L844"></a><tt class="py-lineno"> 844</tt> <a class="py-toggle" href="#" id="CppClass.get_pystruct-toggle" onclick="return toggle('CppClass.get_pystruct');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_pystruct">get_pystruct</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_pystruct-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_pystruct-expanded"><a name="L845"></a><tt class="py-lineno"> 845</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L846"></a><tt class="py-lineno"> 846</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt> </tt>
<a name="L847"></a><tt class="py-lineno"> 847</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt> </tt>
</div><a name="L848"></a><tt class="py-lineno"> 848</tt>  <tt class="py-line">    <tt id="link-255" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-255', 'pystruct', 'link-68');">pystruct</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-256" class="py-name" targets="Method pybindgen.container.Container.get_pystruct()=pybindgen.container.Container-class.html#get_pystruct,Method pybindgen.cppclass.CppClass.get_pystruct()=pybindgen.cppclass.CppClass-class.html#get_pystruct"><a title="pybindgen.container.Container.get_pystruct
pybindgen.cppclass.CppClass.get_pystruct" class="py-name" href="#" onclick="return doclink('link-256', 'get_pystruct', 'link-256');">get_pystruct</a></tt><tt class="py-op">)</tt> </tt>
<a name="L849"></a><tt class="py-lineno"> 849</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_construct_name"></a><div id="CppClass.get_construct_name-def"><a name="L850"></a><tt class="py-lineno"> 850</tt> <a class="py-toggle" href="#" id="CppClass.get_construct_name-toggle" onclick="return toggle('CppClass.get_construct_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_construct_name">get_construct_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_construct_name-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_construct_name-expanded"><a name="L851"></a><tt class="py-lineno"> 851</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get a name usable for new %s construction, or raise</tt> </tt>
<a name="L852"></a><tt class="py-lineno"> 852</tt>  <tt class="py-line"><tt class="py-docstring">        CodeGenerationError if none found"""</tt> </tt>
<a name="L853"></a><tt class="py-lineno"> 853</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">:</tt> </tt>
<a name="L854"></a><tt class="py-lineno"> 854</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-257" class="py-name"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-257', 'CodeGenerationError', 'link-5');">CodeGenerationError</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s cannot be constructed (%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L855"></a><tt class="py-lineno"> 855</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-258" class="py-name"><a title="pybindgen.cppclass.CppClass.have_pure_virtual_methods" class="py-name" href="#" onclick="return doclink('link-258', 'have_pure_virtual_methods', 'link-247');">have_pure_virtual_methods</a></tt><tt class="py-op">:</tt> </tt>
<a name="L856"></a><tt class="py-lineno"> 856</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-259" class="py-name"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-259', 'CodeGenerationError', 'link-5');">CodeGenerationError</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s cannot be constructed (class has pure virtual methods)"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L857"></a><tt class="py-lineno"> 857</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L858"></a><tt class="py-lineno"> 858</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> </tt>
</div><a name="L859"></a><tt class="py-lineno"> 859</tt>  <tt class="py-line">         </tt>
<a name="L860"></a><tt class="py-lineno"> 860</tt>  <tt class="py-line"> </tt>
<a name="CppClass.implicitly_converts_to"></a><div id="CppClass.implicitly_converts_to-def"><a name="L861"></a><tt class="py-lineno"> 861</tt> <a class="py-toggle" href="#" id="CppClass.implicitly_converts_to-toggle" onclick="return toggle('CppClass.implicitly_converts_to');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#implicitly_converts_to">implicitly_converts_to</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">other</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.implicitly_converts_to-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.implicitly_converts_to-expanded"><a name="L862"></a><tt class="py-lineno"> 862</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L863"></a><tt class="py-lineno"> 863</tt>  <tt class="py-line"><tt class="py-docstring">        Declares that values of this class can be implicitly converted</tt> </tt>
<a name="L864"></a><tt class="py-lineno"> 864</tt>  <tt class="py-line"><tt class="py-docstring">        to another class; corresponds to a operator AnotherClass();</tt> </tt>
<a name="L865"></a><tt class="py-lineno"> 865</tt>  <tt class="py-line"><tt class="py-docstring">        special method.</tt> </tt>
<a name="L866"></a><tt class="py-lineno"> 866</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L867"></a><tt class="py-lineno"> 867</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">other</tt><tt class="py-op">,</tt> <tt id="link-260" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-260', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt> </tt>
<a name="L868"></a><tt class="py-lineno"> 868</tt>  <tt class="py-line">        <tt class="py-name">other</tt><tt class="py-op">.</tt><tt class="py-name">implicitly_converts_from</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L869"></a><tt class="py-lineno"> 869</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_all_implicit_conversions"></a><div id="CppClass.get_all_implicit_conversions-def"><a name="L870"></a><tt class="py-lineno"> 870</tt> <a class="py-toggle" href="#" id="CppClass.get_all_implicit_conversions-toggle" onclick="return toggle('CppClass.get_all_implicit_conversions');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_all_implicit_conversions">get_all_implicit_conversions</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_all_implicit_conversions-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_all_implicit_conversions-expanded"><a name="L871"></a><tt class="py-lineno"> 871</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L872"></a><tt class="py-lineno"> 872</tt>  <tt class="py-line"><tt class="py-docstring">        Gets a new list of all other classes whose value can be implicitly</tt> </tt>
<a name="L873"></a><tt class="py-lineno"> 873</tt>  <tt class="py-line"><tt class="py-docstring">        converted to a value of this class.</tt> </tt>
<a name="L874"></a><tt class="py-lineno"> 874</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L875"></a><tt class="py-lineno"> 875</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; Foo = CppClass("Foo")</tt> </tt>
<a name="L876"></a><tt class="py-lineno"> 876</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; Bar = CppClass("Bar")</tt> </tt>
<a name="L877"></a><tt class="py-lineno"> 877</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; Zbr = CppClass("Zbr")</tt> </tt>
<a name="L878"></a><tt class="py-lineno"> 878</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; Bar.implicitly_converts_to(Foo)</tt> </tt>
<a name="L879"></a><tt class="py-lineno"> 879</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; Zbr.implicitly_converts_to(Bar)</tt> </tt>
<a name="L880"></a><tt class="py-lineno"> 880</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; l = Foo.get_all_implicit_conversions()</tt> </tt>
<a name="L881"></a><tt class="py-lineno"> 881</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; l.sort(lambda cls1, cls2: cmp(cls1.name, cls2.name))</tt> </tt>
<a name="L882"></a><tt class="py-lineno"> 882</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; [cls.name for cls in l]</tt> </tt>
<a name="L883"></a><tt class="py-lineno"> 883</tt>  <tt class="py-line"><tt class="py-docstring">        ['Bar']</tt> </tt>
<a name="L884"></a><tt class="py-lineno"> 884</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L885"></a><tt class="py-lineno"> 885</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">implicitly_converts_from</tt><tt class="py-op">)</tt> </tt>
</div><a name="L886"></a><tt class="py-lineno"> 886</tt>  <tt class="py-line"><tt class="py-comment">#         classes = []</tt> </tt>
<a name="L887"></a><tt class="py-lineno"> 887</tt>  <tt class="py-line"><tt class="py-comment">#         to_visit = list(self.implicitly_converts_from)</tt> </tt>
<a name="L888"></a><tt class="py-lineno"> 888</tt>  <tt class="py-line"><tt class="py-comment">#         while to_visit:</tt> </tt>
<a name="L889"></a><tt class="py-lineno"> 889</tt>  <tt class="py-line"><tt class="py-comment">#             source = to_visit.pop(0)</tt> </tt>
<a name="L890"></a><tt class="py-lineno"> 890</tt>  <tt class="py-line"><tt class="py-comment">#             if source in classes or source is self:</tt> </tt>
<a name="L891"></a><tt class="py-lineno"> 891</tt>  <tt class="py-line"><tt class="py-comment">#                 continue</tt> </tt>
<a name="L892"></a><tt class="py-lineno"> 892</tt>  <tt class="py-line"><tt class="py-comment">#             classes.append(source)</tt> </tt>
<a name="L893"></a><tt class="py-lineno"> 893</tt>  <tt class="py-line"><tt class="py-comment">#             to_visit.extend(source.implicitly_converts_from)</tt> </tt>
<a name="L894"></a><tt class="py-lineno"> 894</tt>  <tt class="py-line"><tt class="py-comment">#         return classes</tt> </tt>
<a name="L895"></a><tt class="py-lineno"> 895</tt>  <tt class="py-line"> </tt>
<a name="CppClass._update_names"></a><div id="CppClass._update_names-def"><a name="L896"></a><tt class="py-lineno"> 896</tt> <a class="py-toggle" href="#" id="CppClass._update_names-toggle" onclick="return toggle('CppClass._update_names');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_update_names">_update_names</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._update_names-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._update_names-expanded"><a name="L897"></a><tt class="py-lineno"> 897</tt>  <tt class="py-line">         </tt>
<a name="L898"></a><tt class="py-lineno"> 898</tt>  <tt class="py-line">        <tt class="py-name">prefix</tt> <tt class="py-op">=</tt> <tt id="link-261" class="py-name"><a title="pybindgen.settings" class="py-name" href="#" onclick="return doclink('link-261', 'settings', 'link-26');">settings</a></tt><tt class="py-op">.</tt><tt id="link-262" class="py-name" targets="Variable pybindgen.settings.name_prefix=pybindgen.settings-module.html#name_prefix"><a title="pybindgen.settings.name_prefix" class="py-name" href="#" onclick="return doclink('link-262', 'name_prefix', 'link-262');">name_prefix</a></tt><tt class="py-op">.</tt><tt class="py-name">capitalize</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L899"></a><tt class="py-lineno"> 899</tt>  <tt class="py-line"> </tt>
<a name="L900"></a><tt class="py-lineno"> 900</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L901"></a><tt class="py-lineno"> 901</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">foreign_cpp_namespace</tt><tt class="py-op">:</tt> </tt>
<a name="L902"></a><tt class="py-lineno"> 902</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">foreign_cpp_namespace</tt> <tt class="py-op">+</tt> <tt class="py-string">'::'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-263" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-263', 'name', 'link-66');">name</a></tt> </tt>
<a name="L903"></a><tt class="py-lineno"> 903</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L904"></a><tt class="py-lineno"> 904</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt><tt class="py-op">.</tt><tt class="py-name">cpp_namespace_prefix</tt><tt class="py-op">:</tt> </tt>
<a name="L905"></a><tt class="py-lineno"> 905</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt><tt class="py-op">.</tt><tt class="py-name">cpp_namespace_prefix</tt> <tt class="py-op">==</tt> <tt class="py-string">'::'</tt><tt class="py-op">:</tt> </tt>
<a name="L906"></a><tt class="py-lineno"> 906</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'::'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-264" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-264', 'name', 'link-66');">name</a></tt> </tt>
<a name="L907"></a><tt class="py-lineno"> 907</tt>  <tt class="py-line">                    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L908"></a><tt class="py-lineno"> 908</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt><tt class="py-op">.</tt><tt class="py-name">cpp_namespace_prefix</tt> <tt class="py-op">+</tt> <tt class="py-string">'::'</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-265" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-265', 'name', 'link-66');">name</a></tt> </tt>
<a name="L909"></a><tt class="py-lineno"> 909</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L910"></a><tt class="py-lineno"> 910</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-266" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-266', 'name', 'link-66');">name</a></tt> </tt>
<a name="L911"></a><tt class="py-lineno"> 911</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L912"></a><tt class="py-lineno"> 912</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">foreign_cpp_namespace</tt> </tt>
<a name="L913"></a><tt class="py-lineno"> 913</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'::'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-267" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-267', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L914"></a><tt class="py-lineno"> 914</tt>  <tt class="py-line"> </tt>
<a name="L915"></a><tt class="py-lineno"> 915</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">make_upper</tt><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L916"></a><tt class="py-lineno"> 916</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">s</tt> <tt class="py-keyword">and</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">islower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L917"></a><tt class="py-lineno"> 917</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">upper</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L918"></a><tt class="py-lineno"> 918</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L919"></a><tt class="py-lineno"> 919</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div><a name="L920"></a><tt class="py-lineno"> 920</tt>  <tt class="py-line"> </tt>
<a name="L921"></a><tt class="py-lineno"> 921</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">mangle</tt><tt class="py-op">(</tt><tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L922"></a><tt class="py-lineno"> 922</tt>  <tt class="py-line">            <tt class="py-docstring">"make a name Like&lt;This,and,That&gt; look Like__lt__This_and_That__gt__"</tt> </tt>
<a name="L923"></a><tt class="py-lineno"> 923</tt>  <tt class="py-line">            <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'__lt__'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'__gt__'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">','</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt> </tt>
<a name="L924"></a><tt class="py-lineno"> 924</tt>  <tt class="py-line">            <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&amp;'</tt><tt class="py-op">,</tt> <tt class="py-string">'__amp__'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'__star__'</tt><tt class="py-op">)</tt> </tt>
<a name="L925"></a><tt class="py-lineno"> 925</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div><a name="L926"></a><tt class="py-lineno"> 926</tt>  <tt class="py-line">         </tt>
<a name="L927"></a><tt class="py-lineno"> 927</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">flatten</tt><tt class="py-op">(</tt><tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L928"></a><tt class="py-lineno"> 928</tt>  <tt class="py-line">            <tt class="py-docstring">"make a name like::This look LikeThis"</tt> </tt>
<a name="L929"></a><tt class="py-lineno"> 929</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">make_upper</tt><tt class="py-op">(</tt><tt class="py-name">mangle</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt id="link-268" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-268', 'name', 'link-66');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'::'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L930"></a><tt class="py-lineno"> 930</tt>  <tt class="py-line"> </tt>
<a name="L931"></a><tt class="py-lineno"> 931</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt> <tt class="py-op">=</tt> <tt class="py-name">flatten</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-269" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-269', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L932"></a><tt class="py-lineno"> 932</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt> <tt class="py-op">=</tt> <tt class="py-name">flatten</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L933"></a><tt class="py-lineno"> 933</tt>  <tt class="py-line"> </tt>
<a name="L934"></a><tt class="py-lineno"> 934</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">template_parameters</tt><tt class="py-op">:</tt> </tt>
<a name="L935"></a><tt class="py-lineno"> 935</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt> <tt class="py-op">+=</tt> <tt class="py-string">"&lt; %s &gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-string">', '</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">template_parameters</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L936"></a><tt class="py-lineno"> 936</tt>  <tt class="py-line">            <tt class="py-name">mangled_template_params</tt> <tt class="py-op">=</tt> <tt class="py-string">'__'</tt> <tt class="py-op">+</tt> <tt class="py-string">'_'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">flatten</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">template_parameters</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L937"></a><tt class="py-lineno"> 937</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt> <tt class="py-op">+=</tt> <tt class="py-name">mangled_template_params</tt> </tt>
<a name="L938"></a><tt class="py-lineno"> 938</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt> <tt class="py-op">+=</tt> <tt class="py-name">mangled_template_params</tt> </tt>
<a name="L939"></a><tt class="py-lineno"> 939</tt>  <tt class="py-line"> </tt>
<a name="L940"></a><tt class="py-lineno"> 940</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt> <tt class="py-op">=</tt> <tt class="py-string">"Py%s%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L941"></a><tt class="py-lineno"> 941</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%sMeta"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt> </tt>
<a name="L942"></a><tt class="py-lineno"> 942</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt> <tt class="py-op">=</tt> <tt class="py-string">"Py%s%s_Type"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">,</tt>  <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L943"></a><tt class="py-lineno"> 943</tt>  <tt class="py-line"> </tt>
<a name="L944"></a><tt class="py-lineno"> 944</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_attributes</tt><tt class="py-op">.</tt><tt class="py-name">cname</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__getsets"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt> </tt>
<a name="L945"></a><tt class="py-lineno"> 945</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt><tt class="py-op">.</tt><tt class="py-name">cname</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__getsets"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt> </tt>
<a name="L946"></a><tt class="py-lineno"> 946</tt>  <tt class="py-line"> </tt>
<a name="L947"></a><tt class="py-lineno"> 947</tt>  <tt class="py-line">        <tt class="py-comment">## re-register the class type handlers, now with class full name</tt> </tt>
<a name="L948"></a><tt class="py-lineno"> 948</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-270" class="py-name" targets="Method pybindgen.container.Container.register_alias()=pybindgen.container.Container-class.html#register_alias,Method pybindgen.cppclass.CppClass.register_alias()=pybindgen.cppclass.CppClass-class.html#register_alias"><a title="pybindgen.container.Container.register_alias
pybindgen.cppclass.CppClass.register_alias" class="py-name" href="#" onclick="return doclink('link-270', 'register_alias', 'link-270');">register_alias</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L949"></a><tt class="py-lineno"> 949</tt>  <tt class="py-line"> </tt>
<a name="L950"></a><tt class="py-lineno"> 950</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-271" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_type_narrowing_root()=pybindgen.cppclass.CppClass-class.html#get_type_narrowing_root"><a title="pybindgen.cppclass.CppClass.get_type_narrowing_root" class="py-name" href="#" onclick="return doclink('link-271', 'get_type_narrowing_root', 'link-271');">get_type_narrowing_root</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L951"></a><tt class="py-lineno"> 951</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__typeid_map"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-272" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-272', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L952"></a><tt class="py-lineno"> 952</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L953"></a><tt class="py-lineno"> 953</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L954"></a><tt class="py-lineno"> 954</tt>  <tt class="py-line"> </tt>
<a name="CppClass.register_alias"></a><div id="CppClass.register_alias-def"><a name="L955"></a><tt class="py-lineno"> 955</tt> <a class="py-toggle" href="#" id="CppClass.register_alias-toggle" onclick="return toggle('CppClass.register_alias');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#register_alias">register_alias</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">alias</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.register_alias-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.register_alias-expanded"><a name="L956"></a><tt class="py-lineno"> 956</tt>  <tt class="py-line">        <tt class="py-docstring">"""Re-register the class with another base name, in addition to any</tt> </tt>
<a name="L957"></a><tt class="py-lineno"> 957</tt>  <tt class="py-line"><tt class="py-docstring">        registrations that might have already been done."""</tt> </tt>
<a name="L958"></a><tt class="py-lineno"> 958</tt>  <tt class="py-line"> </tt>
<a name="L959"></a><tt class="py-lineno"> 959</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-273" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-273', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-274" class="py-name" targets="Method pybindgen.module.ModuleBase.register_type()=pybindgen.module.ModuleBase-class.html#register_type"><a title="pybindgen.module.ModuleBase.register_type" class="py-name" href="#" onclick="return doclink('link-274', 'register_type', 'link-274');">register_type</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">alias</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L960"></a><tt class="py-lineno"> 960</tt>  <tt class="py-line"> </tt>
<a name="L961"></a><tt class="py-lineno"> 961</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassParameter</tt><tt class="py-op">.</tt><tt id="link-275" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-275', 'CTYPES', 'link-202');">CTYPES</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">)</tt> </tt>
<a name="L962"></a><tt class="py-lineno"> 962</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L963"></a><tt class="py-lineno"> 963</tt>  <tt class="py-line">            <tt id="link-276" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-276', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-277" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-277', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L964"></a><tt class="py-lineno"> 964</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L965"></a><tt class="py-lineno"> 965</tt>  <tt class="py-line">         </tt>
<a name="L966"></a><tt class="py-lineno"> 966</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">.</tt><tt id="link-278" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-278', 'CTYPES', 'link-202');">CTYPES</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'&amp;'</tt><tt class="py-op">)</tt> </tt>
<a name="L967"></a><tt class="py-lineno"> 967</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L968"></a><tt class="py-lineno"> 968</tt>  <tt class="py-line">            <tt id="link-279" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-279', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-280" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-280', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'&amp;'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L969"></a><tt class="py-lineno"> 969</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L970"></a><tt class="py-lineno"> 970</tt>  <tt class="py-line">         </tt>
<a name="L971"></a><tt class="py-lineno"> 971</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">.</tt><tt id="link-281" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-281', 'CTYPES', 'link-202');">CTYPES</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">)</tt> </tt>
<a name="L972"></a><tt class="py-lineno"> 972</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L973"></a><tt class="py-lineno"> 973</tt>  <tt class="py-line">            <tt id="link-282" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-282', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-283" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-283', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">)</tt> </tt>
<a name="L974"></a><tt class="py-lineno"> 974</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L975"></a><tt class="py-lineno"> 975</tt>  <tt class="py-line">         </tt>
<a name="L976"></a><tt class="py-lineno"> 976</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrParameter</tt><tt class="py-op">.</tt><tt id="link-284" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-284', 'CTYPES', 'link-202');">CTYPES</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt> </tt>
<a name="L977"></a><tt class="py-lineno"> 977</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L978"></a><tt class="py-lineno"> 978</tt>  <tt class="py-line">            <tt id="link-285" class="py-name"><a title="pybindgen.typehandlers.base.param_type_matcher" class="py-name" href="#" onclick="return doclink('link-285', 'param_type_matcher', 'link-6');">param_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-286" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-286', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrParameter</tt><tt class="py-op">)</tt> </tt>
<a name="L979"></a><tt class="py-lineno"> 979</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
<a name="L980"></a><tt class="py-lineno"> 980</tt>  <tt class="py-line">         </tt>
<a name="L981"></a><tt class="py-lineno"> 981</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrReturn</tt><tt class="py-op">.</tt><tt id="link-287" class="py-name"><a title="pybindgen.container.ContainerParameter.CTYPES
pybindgen.container.ContainerParameterBase.CTYPES
pybindgen.container.ContainerPtrParameter.CTYPES
pybindgen.container.ContainerRefParameter.CTYPES
pybindgen.container.ContainerReturnValue.CTYPES
pybindgen.container.ContainerReturnValueBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassParameterBase.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassRefParameter.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValue.CTYPES
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.CTYPES
pybindgen.cppmethod.DummyParameter.CTYPES
pybindgen.cppmethod.DummyReturnValue.CTYPES
pybindgen.typehandlers.base.Parameter.CTYPES
pybindgen.typehandlers.base.PointerParameter.CTYPES
pybindgen.typehandlers.base.PointerReturnValue.CTYPES
pybindgen.typehandlers.base.ReturnValue.CTYPES
pybindgen.typehandlers.booltype.BoolParam.CTYPES
pybindgen.typehandlers.booltype.BoolPtrParam.CTYPES
pybindgen.typehandlers.booltype.BoolRefParam.CTYPES
pybindgen.typehandlers.booltype.BoolReturn.CTYPES
pybindgen.typehandlers.doubletype.DoubleParam.CTYPES
pybindgen.typehandlers.doubletype.DoublePtrParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleRefParam.CTYPES
pybindgen.typehandlers.doubletype.DoubleReturn.CTYPES
pybindgen.typehandlers.floattype.FloatParam.CTYPES
pybindgen.typehandlers.floattype.FloatPtrParam.CTYPES
pybindgen.typehandlers.floattype.FloatRefParam.CTYPES
pybindgen.typehandlers.floattype.FloatReturn.CTYPES
pybindgen.typehandlers.inttype.Int16Param.CTYPES
pybindgen.typehandlers.inttype.Int16Return.CTYPES
pybindgen.typehandlers.inttype.Int8PtrParam.CTYPES
pybindgen.typehandlers.inttype.IntParam.CTYPES
pybindgen.typehandlers.inttype.IntPtrParam.CTYPES
pybindgen.typehandlers.inttype.IntRefParam.CTYPES
pybindgen.typehandlers.inttype.IntReturn.CTYPES
pybindgen.typehandlers.inttype.LongLongParam.CTYPES
pybindgen.typehandlers.inttype.LongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.LongLongReturn.CTYPES
pybindgen.typehandlers.inttype.SizeTParam.CTYPES
pybindgen.typehandlers.inttype.SizeTReturn.CTYPES
pybindgen.typehandlers.inttype.UInt16Param.CTYPES
pybindgen.typehandlers.inttype.UInt16Return.CTYPES
pybindgen.typehandlers.inttype.UInt8Param.CTYPES
pybindgen.typehandlers.inttype.UInt8PtrParam.CTYPES
pybindgen.typehandlers.inttype.UInt8Return.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntPtrParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedIntReturn.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongRefParam.CTYPES
pybindgen.typehandlers.inttype.UnsignedLongLongReturn.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectParam.CTYPES
pybindgen.typehandlers.pyobjecttype.PyObjectReturnValue.CTYPES
pybindgen.typehandlers.stringtype.CStringParam.CTYPES
pybindgen.typehandlers.stringtype.CStringReturn.CTYPES
pybindgen.typehandlers.stringtype.CharParam.CTYPES
pybindgen.typehandlers.stringtype.CharReturn.CTYPES
pybindgen.typehandlers.stringtype.StdStringParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringRefParam.CTYPES
pybindgen.typehandlers.stringtype.StdStringReturn.CTYPES
pybindgen.typehandlers.voidtype.VoidReturn.CTYPES" class="py-name" href="#" onclick="return doclink('link-287', 'CTYPES', 'link-202');">CTYPES</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">)</tt> </tt>
<a name="L982"></a><tt class="py-lineno"> 982</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L983"></a><tt class="py-lineno"> 983</tt>  <tt class="py-line">            <tt id="link-288" class="py-name"><a title="pybindgen.typehandlers.base.return_type_matcher" class="py-name" href="#" onclick="return doclink('link-288', 'return_type_matcher', 'link-7');">return_type_matcher</a></tt><tt class="py-op">.</tt><tt id="link-289" class="py-name"><a title="pybindgen.typehandlers.base.TypeMatcher.register" class="py-name" href="#" onclick="return doclink('link-289', 'register', 'link-205');">register</a></tt><tt class="py-op">(</tt><tt class="py-name">alias</tt><tt class="py-op">+</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassPtrReturn</tt><tt class="py-op">)</tt> </tt>
<a name="L984"></a><tt class="py-lineno"> 984</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div><a name="L985"></a><tt class="py-lineno"> 985</tt>  <tt class="py-line">         </tt>
<a name="CppClass.get_module"></a><div id="CppClass.get_module-def"><a name="L986"></a><tt class="py-lineno"> 986</tt> <a class="py-toggle" href="#" id="CppClass.get_module-toggle" onclick="return toggle('CppClass.get_module');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_module">get_module</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_module-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_module-expanded"><a name="L987"></a><tt class="py-lineno"> 987</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get the Module object this class belongs to"""</tt> </tt>
<a name="L988"></a><tt class="py-lineno"> 988</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt> </tt>
</div><a name="L989"></a><tt class="py-lineno"> 989</tt>  <tt class="py-line"> </tt>
<a name="CppClass.set_module"></a><div id="CppClass.set_module-def"><a name="L990"></a><tt class="py-lineno"> 990</tt> <a class="py-toggle" href="#" id="CppClass.set_module-toggle" onclick="return toggle('CppClass.set_module');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#set_module">set_module</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.set_module-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.set_module-expanded"><a name="L991"></a><tt class="py-lineno"> 991</tt>  <tt class="py-line">        <tt class="py-docstring">"""Set the Module object this class belongs to"""</tt> </tt>
<a name="L992"></a><tt class="py-lineno"> 992</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt> <tt class="py-op">=</tt> <tt id="link-290" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-290', 'module', 'link-237');">module</a></tt> </tt>
<a name="L993"></a><tt class="py-lineno"> 993</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_update_names</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L994"></a><tt class="py-lineno"> 994</tt>  <tt class="py-line"> </tt>
<a name="L995"></a><tt class="py-lineno"> 995</tt>  <tt class="py-line">    <tt id="link-291" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-291', 'module', 'link-237');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-292" class="py-name" targets="Method pybindgen.container.Container.get_module()=pybindgen.container.Container-class.html#get_module,Method pybindgen.cppclass.CppClass.get_module()=pybindgen.cppclass.CppClass-class.html#get_module,Method pybindgen.enum.Enum.get_module()=pybindgen.enum.Enum-class.html#get_module,Method pybindgen.function.Function.get_module()=pybindgen.function.Function-class.html#get_module"><a title="pybindgen.container.Container.get_module
pybindgen.cppclass.CppClass.get_module
pybindgen.enum.Enum.get_module
pybindgen.function.Function.get_module" class="py-name" href="#" onclick="return doclink('link-292', 'get_module', 'link-292');">get_module</a></tt><tt class="py-op">,</tt> <tt id="link-293" class="py-name" targets="Method pybindgen.container.Container.set_module()=pybindgen.container.Container-class.html#set_module,Method pybindgen.cppclass.CppClass.set_module()=pybindgen.cppclass.CppClass-class.html#set_module,Method pybindgen.enum.Enum.set_module()=pybindgen.enum.Enum-class.html#set_module,Method pybindgen.function.Function.set_module()=pybindgen.function.Function-class.html#set_module"><a title="pybindgen.container.Container.set_module
pybindgen.cppclass.CppClass.set_module
pybindgen.enum.Enum.set_module
pybindgen.function.Function.set_module" class="py-name" href="#" onclick="return doclink('link-293', 'set_module', 'link-293');">set_module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L996"></a><tt class="py-lineno"> 996</tt>  <tt class="py-line"> </tt>
<a name="L997"></a><tt class="py-lineno"> 997</tt>  <tt class="py-line"> </tt>
<a name="CppClass.inherit_default_constructors"></a><div id="CppClass.inherit_default_constructors-def"><a name="L998"></a><tt class="py-lineno"> 998</tt> <a class="py-toggle" href="#" id="CppClass.inherit_default_constructors-toggle" onclick="return toggle('CppClass.inherit_default_constructors');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#inherit_default_constructors">inherit_default_constructors</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.inherit_default_constructors-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.inherit_default_constructors-expanded"><a name="L999"></a><tt class="py-lineno"> 999</tt>  <tt class="py-line">        <tt class="py-docstring">"""inherit the default constructors from the parentclass according to C++</tt> </tt>
<a name="L1000"></a><tt class="py-lineno">1000</tt>  <tt class="py-line"><tt class="py-docstring">        language rules"""</tt> </tt>
<a name="L1001"></a><tt class="py-lineno">1001</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1002"></a><tt class="py-lineno">1002</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1003"></a><tt class="py-lineno">1003</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">cons</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt><tt class="py-op">:</tt> </tt>
<a name="L1004"></a><tt class="py-lineno">1004</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1005"></a><tt class="py-lineno">1005</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-294" class="py-name" targets="Method pybindgen.cppclass.CppClass.add_constructor()=pybindgen.cppclass.CppClass-class.html#add_constructor"><a title="pybindgen.cppclass.CppClass.add_constructor" class="py-name" href="#" onclick="return doclink('link-294', 'add_constructor', 'link-294');">add_constructor</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">visibility</tt><tt class="py-op">=</tt><tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt><tt class="py-op">)</tt> </tt>
<a name="L1006"></a><tt class="py-lineno">1006</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1007"></a><tt class="py-lineno">1007</tt>  <tt class="py-line">                  <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1008"></a><tt class="py-lineno">1008</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-295" class="py-name"><a title="pybindgen.cppclass.CppClass.add_constructor" class="py-name" href="#" onclick="return doclink('link-295', 'add_constructor', 'link-294');">add_constructor</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">visibility</tt><tt class="py-op">=</tt><tt class="py-name">cons</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1009"></a><tt class="py-lineno">1009</tt>  <tt class="py-line"> </tt>
<a name="CppClass.get_helper_class"></a><div id="CppClass.get_helper_class-def"><a name="L1010"></a><tt class="py-lineno">1010</tt> <a class="py-toggle" href="#" id="CppClass.get_helper_class-toggle" onclick="return toggle('CppClass.get_helper_class');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_helper_class">get_helper_class</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_helper_class-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_helper_class-expanded"><a name="L1011"></a><tt class="py-lineno">1011</tt>  <tt class="py-line">        <tt class="py-docstring">"""gets the "helper class" for this class wrapper, creating it if necessary"""</tt> </tt>
<a name="L1012"></a><tt class="py-lineno">1012</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-296" class="py-name"><a title="pybindgen.cppclass.CppClass.get_mro" class="py-name" href="#" onclick="return doclink('link-296', 'get_mro', 'link-241');">get_mro</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1013"></a><tt class="py-lineno">1013</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_disabled</tt><tt class="py-op">:</tt> </tt>
<a name="L1014"></a><tt class="py-lineno">1014</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1015"></a><tt class="py-lineno">1015</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-297" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-297', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1016"></a><tt class="py-lineno">1016</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1017"></a><tt class="py-lineno">1017</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-298" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-298', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1018"></a><tt class="py-lineno">1018</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_singleton</tt><tt class="py-op">:</tt> </tt>
<a name="L1019"></a><tt class="py-lineno">1019</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-299" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-299', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt id="link-300" class="py-name" targets="Class pybindgen.cppclass.CppHelperClass=pybindgen.cppclass.CppHelperClass-class.html"><a title="pybindgen.cppclass.CppHelperClass" class="py-name" href="#" onclick="return doclink('link-300', 'CppHelperClass', 'link-300');">CppHelperClass</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1020"></a><tt class="py-lineno">1020</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-301" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-301', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-302" class="py-name" targets="Method pybindgen.module.ModuleBase.add_include()=pybindgen.module.ModuleBase-class.html#add_include"><a title="pybindgen.module.ModuleBase.add_include" class="py-name" href="#" onclick="return doclink('link-302', 'add_include', 'link-302');">add_include</a></tt><tt class="py-op">(</tt><tt class="py-string">'&lt;typeinfo&gt;'</tt><tt class="py-op">)</tt> </tt>
<a name="L1021"></a><tt class="py-lineno">1021</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-303" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-303', 'helper_class', 'link-73');">helper_class</a></tt> </tt>
</div><a name="L1022"></a><tt class="py-lineno">1022</tt>  <tt class="py-line">     </tt>
<a name="CppClass.get_type_narrowing_root"></a><div id="CppClass.get_type_narrowing_root-def"><a name="L1023"></a><tt class="py-lineno">1023</tt> <a class="py-toggle" href="#" id="CppClass.get_type_narrowing_root-toggle" onclick="return toggle('CppClass.get_type_narrowing_root');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#get_type_narrowing_root">get_type_narrowing_root</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.get_type_narrowing_root-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.get_type_narrowing_root-expanded"><a name="L1024"></a><tt class="py-lineno">1024</tt>  <tt class="py-line">        <tt class="py-docstring">"""Find the root CppClass along the subtree of all parent classes that</tt> </tt>
<a name="L1025"></a><tt class="py-lineno">1025</tt>  <tt class="py-line"><tt class="py-docstring">        have automatic_type_narrowing=True Note: multiple inheritance</tt> </tt>
<a name="L1026"></a><tt class="py-lineno">1026</tt>  <tt class="py-line"><tt class="py-docstring">        not implemented"""</tt> </tt>
<a name="L1027"></a><tt class="py-lineno">1027</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-304" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-304', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1028"></a><tt class="py-lineno">1028</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1029"></a><tt class="py-lineno">1029</tt>  <tt class="py-line">        <tt class="py-name">root</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L1030"></a><tt class="py-lineno">1030</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-op">(</tt><tt class="py-name">root</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L1031"></a><tt class="py-lineno">1031</tt>  <tt class="py-line">               <tt class="py-keyword">and</tt> <tt class="py-name">root</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-305" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-305', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1032"></a><tt class="py-lineno">1032</tt>  <tt class="py-line">            <tt class="py-name">root</tt> <tt class="py-op">=</tt> <tt class="py-name">root</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> </tt>
<a name="L1033"></a><tt class="py-lineno">1033</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">root</tt> </tt>
</div><a name="L1034"></a><tt class="py-lineno">1034</tt>  <tt class="py-line"> </tt>
<a name="CppClass._register_typeid"></a><div id="CppClass._register_typeid-def"><a name="L1035"></a><tt class="py-lineno">1035</tt> <a class="py-toggle" href="#" id="CppClass._register_typeid-toggle" onclick="return toggle('CppClass._register_typeid');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_register_typeid">_register_typeid</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._register_typeid-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._register_typeid-expanded"><a name="L1036"></a><tt class="py-lineno">1036</tt>  <tt class="py-line">        <tt class="py-docstring">"""register this class with the typeid map root class"""</tt> </tt>
<a name="L1037"></a><tt class="py-lineno">1037</tt>  <tt class="py-line">        <tt class="py-name">root</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-306" class="py-name"><a title="pybindgen.cppclass.CppClass.get_type_narrowing_root" class="py-name" href="#" onclick="return doclink('link-306', 'get_type_narrowing_root', 'link-271');">get_type_narrowing_root</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1038"></a><tt class="py-lineno">1038</tt>  <tt class="py-line">        <tt id="link-307" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-307', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-308" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-308', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s.register_wrapper(typeid(%s), &amp;%s);"</tt> </tt>
<a name="L1039"></a><tt class="py-lineno">1039</tt>  <tt class="py-line">                                     <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">root</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1040"></a><tt class="py-lineno">1040</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_typeid_map"></a><div id="CppClass._generate_typeid_map-def"><a name="L1041"></a><tt class="py-lineno">1041</tt> <a class="py-toggle" href="#" id="CppClass._generate_typeid_map-toggle" onclick="return toggle('CppClass._generate_typeid_map');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_typeid_map">_generate_typeid_map</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_typeid_map-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_typeid_map-expanded"><a name="L1042"></a><tt class="py-lineno">1042</tt>  <tt class="py-line">        <tt class="py-docstring">"""generate the typeid map and fill it with values"""</tt> </tt>
<a name="L1043"></a><tt class="py-lineno">1043</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1044"></a><tt class="py-lineno">1044</tt>  <tt class="py-line">            <tt id="link-309" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-309', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-310" class="py-name" targets="Method pybindgen.module.ModuleBase.declare_one_time_definition()=pybindgen.module.ModuleBase-class.html#declare_one_time_definition"><a title="pybindgen.module.ModuleBase.declare_one_time_definition" class="py-name" href="#" onclick="return doclink('link-310', 'declare_one_time_definition', 'link-310');">declare_one_time_definition</a></tt><tt class="py-op">(</tt><tt class="py-string">"TypeIDMap"</tt><tt class="py-op">)</tt> </tt>
<a name="L1045"></a><tt class="py-lineno">1045</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1046"></a><tt class="py-lineno">1046</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L1047"></a><tt class="py-lineno">1047</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1048"></a><tt class="py-lineno">1048</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-311" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-311', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1049"></a><tt class="py-lineno">1049</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1050"></a><tt class="py-lineno">1050</tt>  <tt class="py-line"><tt class="py-string">#include &lt;map&gt;</tt> </tt>
<a name="L1051"></a><tt class="py-lineno">1051</tt>  <tt class="py-line"><tt class="py-string">#include &lt;typeinfo&gt;</tt> </tt>
<a name="L1052"></a><tt class="py-lineno">1052</tt>  <tt class="py-line"><tt class="py-string">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 3</tt> </tt>
<a name="L1053"></a><tt class="py-lineno">1053</tt>  <tt class="py-line"><tt class="py-string"># include &lt;cxxabi.h&gt;</tt> </tt>
<a name="L1054"></a><tt class="py-lineno">1054</tt>  <tt class="py-line"><tt class="py-string">#endif</tt> </tt>
<a name="L1055"></a><tt class="py-lineno">1055</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1056"></a><tt class="py-lineno">1056</tt>  <tt class="py-line"><tt class="py-string">namespace pybindgen {</tt> </tt>
<a name="L1057"></a><tt class="py-lineno">1057</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1058"></a><tt class="py-lineno">1058</tt>  <tt class="py-line"><tt class="py-string">class TypeMap</tt> </tt>
<a name="L1059"></a><tt class="py-lineno">1059</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1060"></a><tt class="py-lineno">1060</tt>  <tt class="py-line"><tt class="py-string">   std::map&lt;const char *, PyTypeObject *&gt; m_map;</tt> </tt>
<a name="L1061"></a><tt class="py-lineno">1061</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1062"></a><tt class="py-lineno">1062</tt>  <tt class="py-line"><tt class="py-string">public:</tt> </tt>
<a name="L1063"></a><tt class="py-lineno">1063</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1064"></a><tt class="py-lineno">1064</tt>  <tt class="py-line"><tt class="py-string">   TypeMap() {}</tt> </tt>
<a name="L1065"></a><tt class="py-lineno">1065</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1066"></a><tt class="py-lineno">1066</tt>  <tt class="py-line"><tt class="py-string">   void register_wrapper(const std::type_info &amp;cpp_type_info, PyTypeObject *python_wrapper)</tt> </tt>
<a name="L1067"></a><tt class="py-lineno">1067</tt>  <tt class="py-line"><tt class="py-string">   {</tt> </tt>
<a name="L1068"></a><tt class="py-lineno">1068</tt>  <tt class="py-line"><tt class="py-string">       m_map[cpp_type_info.name()] = python_wrapper;</tt> </tt>
<a name="L1069"></a><tt class="py-lineno">1069</tt>  <tt class="py-line"><tt class="py-string">   }</tt> </tt>
<a name="L1070"></a><tt class="py-lineno">1070</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1071"></a><tt class="py-lineno">1071</tt>  <tt class="py-line"><tt class="py-string">   PyTypeObject * lookup_wrapper(const std::type_info &amp;cpp_type_info, PyTypeObject *fallback_wrapper)</tt> </tt>
<a name="L1072"></a><tt class="py-lineno">1072</tt>  <tt class="py-line"><tt class="py-string">   {</tt> </tt>
<a name="L1073"></a><tt class="py-lineno">1073</tt>  <tt class="py-line"><tt class="py-string">       PyTypeObject *python_wrapper = m_map[cpp_type_info.name()];</tt> </tt>
<a name="L1074"></a><tt class="py-lineno">1074</tt>  <tt class="py-line"><tt class="py-string">       if (python_wrapper)</tt> </tt>
<a name="L1075"></a><tt class="py-lineno">1075</tt>  <tt class="py-line"><tt class="py-string">           return python_wrapper;</tt> </tt>
<a name="L1076"></a><tt class="py-lineno">1076</tt>  <tt class="py-line"><tt class="py-string">       else {</tt> </tt>
<a name="L1077"></a><tt class="py-lineno">1077</tt>  <tt class="py-line"><tt class="py-string">#if defined(__GNUC__) &amp;&amp; __GNUC__ &gt;= 3</tt> </tt>
<a name="L1078"></a><tt class="py-lineno">1078</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1079"></a><tt class="py-lineno">1079</tt>  <tt class="py-line"><tt class="py-string">           // Get closest (in the single inheritance tree provided by cxxabi.h)</tt> </tt>
<a name="L1080"></a><tt class="py-lineno">1080</tt>  <tt class="py-line"><tt class="py-string">           // registered python wrapper.</tt> </tt>
<a name="L1081"></a><tt class="py-lineno">1081</tt>  <tt class="py-line"><tt class="py-string">           const abi::__si_class_type_info *_typeinfo =</tt> </tt>
<a name="L1082"></a><tt class="py-lineno">1082</tt>  <tt class="py-line"><tt class="py-string">               dynamic_cast&lt;const abi::__si_class_type_info*&gt; (&amp;cpp_type_info);</tt> </tt>
<a name="L1083"></a><tt class="py-lineno">1083</tt>  <tt class="py-line"><tt class="py-string">           while (_typeinfo &amp;&amp; (python_wrapper = m_map[_typeinfo-&gt;name()]) == 0)</tt> </tt>
<a name="L1084"></a><tt class="py-lineno">1084</tt>  <tt class="py-line"><tt class="py-string">               _typeinfo = dynamic_cast&lt;const abi::__si_class_type_info*&gt; (_typeinfo-&gt;__base_type);</tt> </tt>
<a name="L1085"></a><tt class="py-lineno">1085</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1086"></a><tt class="py-lineno">1086</tt>  <tt class="py-line"><tt class="py-string">           return python_wrapper? python_wrapper : fallback_wrapper;</tt> </tt>
<a name="L1087"></a><tt class="py-lineno">1087</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1088"></a><tt class="py-lineno">1088</tt>  <tt class="py-line"><tt class="py-string">#else // non gcc 3+ compilers can only match against explicitly registered classes, not hidden subclasses</tt> </tt>
<a name="L1089"></a><tt class="py-lineno">1089</tt>  <tt class="py-line"><tt class="py-string">           return fallback_wrapper;</tt> </tt>
<a name="L1090"></a><tt class="py-lineno">1090</tt>  <tt class="py-line"><tt class="py-string">#endif</tt> </tt>
<a name="L1091"></a><tt class="py-lineno">1091</tt>  <tt class="py-line"><tt class="py-string">       }</tt> </tt>
<a name="L1092"></a><tt class="py-lineno">1092</tt>  <tt class="py-line"><tt class="py-string">   }</tt> </tt>
<a name="L1093"></a><tt class="py-lineno">1093</tt>  <tt class="py-line"><tt class="py-string">};</tt> </tt>
<a name="L1094"></a><tt class="py-lineno">1094</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1095"></a><tt class="py-lineno">1095</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1096"></a><tt class="py-lineno">1096</tt>  <tt class="py-line"><tt class="py-string">'''</tt><tt class="py-op">)</tt> </tt>
<a name="L1097"></a><tt class="py-lineno">1097</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-312" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-312', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"\nextern pybindgen::TypeMap %s;\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1098"></a><tt class="py-lineno">1098</tt>  <tt class="py-line"> </tt>
<a name="CppClass._add_method_obj"></a><div id="CppClass._add_method_obj-def"><a name="L1099"></a><tt class="py-lineno">1099</tt> <a class="py-toggle" href="#" id="CppClass._add_method_obj-toggle" onclick="return toggle('CppClass._add_method_obj');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_add_method_obj">_add_method_obj</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._add_method_obj-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._add_method_obj-expanded"><a name="L1100"></a><tt class="py-lineno">1100</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1101"></a><tt class="py-lineno">1101</tt>  <tt class="py-line"><tt class="py-docstring">        Add a method object to the class.  For internal use.</tt> </tt>
<a name="L1102"></a><tt class="py-lineno">1102</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1103"></a><tt class="py-lineno">1103</tt>  <tt class="py-line"><tt class="py-docstring">        @param method: a L{CppMethod} or L{Function} instance that can generate the method wrapper</tt> </tt>
<a name="L1104"></a><tt class="py-lineno">1104</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1105"></a><tt class="py-lineno">1105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-313" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-313', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1106"></a><tt class="py-lineno">1106</tt>  <tt class="py-line">            <tt id="link-314" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-314', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt> </tt>
<a name="L1107"></a><tt class="py-lineno">1107</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-315" class="py-name" targets="Module pybindgen.function=pybindgen.function-module.html"><a title="pybindgen.function" class="py-name" href="#" onclick="return doclink('link-315', 'function', 'link-315');">function</a></tt><tt class="py-op">.</tt><tt id="link-316" class="py-name" targets="Class pybindgen.function.Function=pybindgen.function.Function-class.html"><a title="pybindgen.function.Function" class="py-name" href="#" onclick="return doclink('link-316', 'Function', 'link-316');">Function</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1108"></a><tt class="py-lineno">1108</tt>  <tt class="py-line">            <tt id="link-317" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-317', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-318" class="py-name" targets="Variable pybindgen.cppmethod.CppMethod.custom_name=pybindgen.cppmethod.CppMethod-class.html#custom_name"><a title="pybindgen.cppmethod.CppMethod.custom_name" class="py-name" href="#" onclick="return doclink('link-318', 'custom_name', 'link-318');">custom_name</a></tt> </tt>
<a name="L1109"></a><tt class="py-lineno">1109</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-319" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassParameterBase=pybindgen.cppclass_typehandlers.CppClassParameterBase-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassParameterBase" class="py-name" href="#" onclick="return doclink('link-319', 'CppClassParameterBase', 'link-319');">CppClassParameterBase</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1110"></a><tt class="py-lineno">1110</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-320" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-320', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> \ </tt>
<a name="L1111"></a><tt class="py-lineno">1111</tt>  <tt class="py-line">                <tt class="py-string">"expected first parameter to be of class %s, but it is of class %s"</tt> <tt class="py-op">%</tt> \ </tt>
<a name="L1112"></a><tt class="py-lineno">1112</tt>  <tt class="py-line">                <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-321" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-321', 'cpp_class', 'link-59');">cpp_class</a></tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1113"></a><tt class="py-lineno">1113</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">take_value_from_python_self</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1114"></a><tt class="py-lineno">1114</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-322" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-322', 'module', 'link-237');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-323" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-323', 'module', 'link-237');">module</a></tt> </tt>
<a name="L1115"></a><tt class="py-lineno">1115</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_virtual</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1116"></a><tt class="py-lineno">1116</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_pure_virtual</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1117"></a><tt class="py-lineno">1117</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">self_parameter_pystruct</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-324" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-324', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L1118"></a><tt class="py-lineno">1118</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt> <tt class="py-op">=</tt> <tt class="py-string">'public'</tt> </tt>
<a name="L1119"></a><tt class="py-lineno">1119</tt>  <tt class="py-line">            <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">force_parse</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-325" class="py-name" targets="Variable pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS=pybindgen.typehandlers.base.ForwardWrapperBase-class.html#PARSE_TUPLE_AND_KEYWORDS"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS" class="py-name" href="#" onclick="return doclink('link-325', 'PARSE_TUPLE_AND_KEYWORDS', 'link-325');">PARSE_TUPLE_AND_KEYWORDS</a></tt> </tt>
<a name="L1120"></a><tt class="py-lineno">1120</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1121"></a><tt class="py-lineno">1121</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt> </tt>
<a name="L1122"></a><tt class="py-lineno">1122</tt>  <tt class="py-line">         </tt>
<a name="L1123"></a><tt class="py-lineno">1123</tt>  <tt class="py-line">        <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-326" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-326', 'class_', 'link-64');">class_</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L1124"></a><tt class="py-lineno">1124</tt>  <tt class="py-line"> </tt>
<a name="L1125"></a><tt class="py-lineno">1125</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt> <tt class="py-op">==</tt> <tt class="py-string">'public'</tt><tt class="py-op">:</tt> </tt>
<a name="L1126"></a><tt class="py-lineno">1126</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-327" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-327', 'name', 'link-66');">name</a></tt> <tt class="py-op">==</tt> <tt class="py-string">'__call__'</tt><tt class="py-op">:</tt> <tt class="py-comment"># needs special handling</tt> </tt>
<a name="L1127"></a><tt class="py-lineno">1127</tt>  <tt class="py-line">                <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">force_parse</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-328" class="py-name"><a title="pybindgen.typehandlers.base.ForwardWrapperBase.PARSE_TUPLE_AND_KEYWORDS" class="py-name" href="#" onclick="return doclink('link-328', 'PARSE_TUPLE_AND_KEYWORDS', 'link-325');">PARSE_TUPLE_AND_KEYWORDS</a></tt> </tt>
<a name="L1128"></a><tt class="py-lineno">1128</tt>  <tt class="py-line"> </tt>
<a name="L1129"></a><tt class="py-lineno">1129</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1130"></a><tt class="py-lineno">1130</tt>  <tt class="py-line">                <tt class="py-name">overload</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt id="link-329" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-329', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1131"></a><tt class="py-lineno">1131</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1132"></a><tt class="py-lineno">1132</tt>  <tt class="py-line">                <tt class="py-name">overload</tt> <tt class="py-op">=</tt> <tt id="link-330" class="py-name"><a title="pybindgen.cppmethod.CppOverloadedMethod" class="py-name" href="#" onclick="return doclink('link-330', 'CppOverloadedMethod', 'link-80');">CppOverloadedMethod</a></tt><tt class="py-op">(</tt><tt id="link-331" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-331', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1133"></a><tt class="py-lineno">1133</tt>  <tt class="py-line">                <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-332" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-332', 'pystruct', 'link-68');">pystruct</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-333" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-333', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L1134"></a><tt class="py-lineno">1134</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt id="link-334" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-334', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">overload</tt> </tt>
<a name="L1135"></a><tt class="py-lineno">1135</tt>  <tt class="py-line"> </tt>
<a name="L1136"></a><tt class="py-lineno">1136</tt>  <tt class="py-line">            <tt class="py-comment">## add it....</tt> </tt>
<a name="L1137"></a><tt class="py-lineno">1137</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1138"></a><tt class="py-lineno">1138</tt>  <tt class="py-line">                <tt id="link-335" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-335', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-336" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-336', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-337" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-337', 'add', 'link-87');">add</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L1139"></a><tt class="py-lineno">1139</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-338" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-338', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-339" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-339', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1140"></a><tt class="py-lineno">1140</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L1141"></a><tt class="py-lineno">1141</tt>  <tt class="py-line"> </tt>
<a name="L1142"></a><tt class="py-lineno">1142</tt>  <tt class="py-line"> </tt>
<a name="L1143"></a><tt class="py-lineno">1143</tt>  <tt class="py-line">            <tt class="py-comment"># Grr! I hate C++.  Overloading + inheritance = disaster!</tt> </tt>
<a name="L1144"></a><tt class="py-lineno">1144</tt>  <tt class="py-line">            <tt class="py-comment"># So I ended up coding something which C++ does not in</tt> </tt>
<a name="L1145"></a><tt class="py-lineno">1145</tt>  <tt class="py-line">            <tt class="py-comment"># fact support, but I feel bad to just throw away my good</tt> </tt>
<a name="L1146"></a><tt class="py-lineno">1146</tt>  <tt class="py-line">            <tt class="py-comment"># code due to a C++ fault, so I am leaving here the code</tt> </tt>
<a name="L1147"></a><tt class="py-lineno">1147</tt>  <tt class="py-line">            <tt class="py-comment"># disabled.  Maybe some future C++ version will come along</tt> </tt>
<a name="L1148"></a><tt class="py-lineno">1148</tt>  <tt class="py-line">            <tt class="py-comment"># and fix this problem, who knows :P</tt> </tt>
<a name="L1149"></a><tt class="py-lineno">1149</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L1150"></a><tt class="py-lineno">1150</tt>  <tt class="py-line">                <tt class="py-comment"># due to a limitation of the pybindgen overloading</tt> </tt>
<a name="L1151"></a><tt class="py-lineno">1151</tt>  <tt class="py-line">                <tt class="py-comment"># strategy, we need to re-wrap for this class all</tt> </tt>
<a name="L1152"></a><tt class="py-lineno">1152</tt>  <tt class="py-line">                <tt class="py-comment"># methods with the same name and different signature</tt> </tt>
<a name="L1153"></a><tt class="py-lineno">1153</tt>  <tt class="py-line">                <tt class="py-comment"># from parent classes.</tt> </tt>
<a name="L1154"></a><tt class="py-lineno">1154</tt>  <tt class="py-line">                <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">_compute_all_wrappers</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1155"></a><tt class="py-lineno">1155</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt id="link-340" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-340', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1156"></a><tt class="py-lineno">1156</tt>  <tt class="py-line">                    <tt class="py-name">mro</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-341" class="py-name"><a title="pybindgen.cppclass.CppClass.get_mro" class="py-name" href="#" onclick="return doclink('link-341', 'get_mro', 'link-241');">get_mro</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1157"></a><tt class="py-lineno">1157</tt>  <tt class="py-line">                    <tt class="py-name">mro</tt><tt class="py-op">.</tt><tt class="py-name">next</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># skip 'self'</tt> </tt>
<a name="L1158"></a><tt class="py-lineno">1158</tt>  <tt class="py-line">                    <tt class="py-keyword">for</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mro</tt><tt class="py-op">:</tt> </tt>
<a name="L1159"></a><tt class="py-lineno">1159</tt>  <tt class="py-line">                        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1160"></a><tt class="py-lineno">1160</tt>  <tt class="py-line">                            <tt class="py-name">parent_overload</tt> <tt class="py-op">=</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt id="link-342" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-342', 'name', 'link-66');">name</a></tt><tt class="py-op">]</tt> </tt>
<a name="L1161"></a><tt class="py-lineno">1161</tt>  <tt class="py-line">                        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1162"></a><tt class="py-lineno">1162</tt>  <tt class="py-line">                            <tt class="py-keyword">continue</tt> </tt>
<a name="L1163"></a><tt class="py-lineno">1163</tt>  <tt class="py-line">                        <tt class="py-name">parent_overload</tt><tt class="py-op">.</tt><tt class="py-name">_compute_all_wrappers</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1164"></a><tt class="py-lineno">1164</tt>  <tt class="py-line">                        <tt class="py-keyword">for</tt> <tt class="py-name">parent_method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">parent_overload</tt><tt class="py-op">.</tt><tt class="py-name">all_wrappers</tt><tt class="py-op">:</tt> </tt>
<a name="L1165"></a><tt class="py-lineno">1165</tt>  <tt class="py-line">                            <tt class="py-name">already_exists</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1166"></a><tt class="py-lineno">1166</tt>  <tt class="py-line">                            <tt class="py-keyword">for</tt> <tt class="py-name">existing_method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">all_wrappers</tt><tt class="py-op">:</tt> </tt>
<a name="L1167"></a><tt class="py-lineno">1167</tt>  <tt class="py-line">                                <tt class="py-keyword">if</tt> <tt class="py-name">existing_method</tt><tt class="py-op">.</tt><tt id="link-343" class="py-name"><a title="pybindgen.cppmethod.CppMethod.matches_signature" class="py-name" href="#" onclick="return doclink('link-343', 'matches_signature', 'link-70');">matches_signature</a></tt><tt class="py-op">(</tt><tt class="py-name">parent_method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1168"></a><tt class="py-lineno">1168</tt>  <tt class="py-line">                                    <tt class="py-name">already_exists</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1169"></a><tt class="py-lineno">1169</tt>  <tt class="py-line">                                    <tt class="py-keyword">break</tt> </tt>
<a name="L1170"></a><tt class="py-lineno">1170</tt>  <tt class="py-line">                            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">already_exists</tt><tt class="py-op">:</tt> </tt>
<a name="L1171"></a><tt class="py-lineno">1171</tt>  <tt class="py-line">                                <tt class="py-name">new_method</tt> <tt class="py-op">=</tt> <tt class="py-name">parent_method</tt><tt class="py-op">.</tt><tt id="link-344" class="py-name" targets="Method pybindgen.cppmethod.CppConstructor.clone()=pybindgen.cppmethod.CppConstructor-class.html#clone,Method pybindgen.cppmethod.CppMethod.clone()=pybindgen.cppmethod.CppMethod-class.html#clone,Method pybindgen.cppmethod.CppVirtualMethodParentCaller.clone()=pybindgen.cppmethod.CppVirtualMethodParentCaller-class.html#clone,Method pybindgen.function.Function.clone()=pybindgen.function.Function-class.html#clone,Method pybindgen.typehandlers.ctypeparser.CType.clone()=pybindgen.typehandlers.ctypeparser.CType-class.html#clone"><a title="pybindgen.cppmethod.CppConstructor.clone
pybindgen.cppmethod.CppMethod.clone
pybindgen.cppmethod.CppVirtualMethodParentCaller.clone
pybindgen.function.Function.clone
pybindgen.typehandlers.ctypeparser.CType.clone" class="py-name" href="#" onclick="return doclink('link-344', 'clone', 'link-344');">clone</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1172"></a><tt class="py-lineno">1172</tt>  <tt class="py-line">                                <tt class="py-name">new_method</tt><tt class="py-op">.</tt><tt id="link-345" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-345', 'class_', 'link-64');">class_</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L1173"></a><tt class="py-lineno">1173</tt>  <tt class="py-line">                                <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-346" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-346', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">new_method</tt><tt class="py-op">)</tt> </tt>
<a name="L1174"></a><tt class="py-lineno">1174</tt>  <tt class="py-line">             </tt>
<a name="L1175"></a><tt class="py-lineno">1175</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1176"></a><tt class="py-lineno">1176</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">nonpublic_methods</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L1177"></a><tt class="py-lineno">1177</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L1178"></a><tt class="py-lineno">1178</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1179"></a><tt class="py-lineno">1179</tt>  <tt class="py-line">            <tt id="link-347" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-347', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-348" class="py-name" targets="Method pybindgen.cppclass.CppClass.get_helper_class()=pybindgen.cppclass.CppClass-class.html#get_helper_class,Method pybindgen.cppmethod.CppMethod.get_helper_class()=pybindgen.cppmethod.CppMethod-class.html#get_helper_class,Method pybindgen.cppmethod.CppVirtualMethodProxy.get_helper_class()=pybindgen.cppmethod.CppVirtualMethodProxy-class.html#get_helper_class"><a title="pybindgen.cppclass.CppClass.get_helper_class
pybindgen.cppmethod.CppMethod.get_helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.get_helper_class" class="py-name" href="#" onclick="return doclink('link-348', 'get_helper_class', 'link-348');">get_helper_class</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1180"></a><tt class="py-lineno">1180</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-349" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-349', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1181"></a><tt class="py-lineno">1181</tt>  <tt class="py-line">                <tt id="link-350" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-350', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-351" class="py-name" targets="Method pybindgen.cppclass.CppHelperClass.add_virtual_method()=pybindgen.cppclass.CppHelperClass-class.html#add_virtual_method"><a title="pybindgen.cppclass.CppHelperClass.add_virtual_method" class="py-name" href="#" onclick="return doclink('link-351', 'add_virtual_method', 'link-351');">add_virtual_method</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1182"></a><tt class="py-lineno">1182</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_method"></a><div id="CppClass.add_method-def"><a name="L1183"></a><tt class="py-lineno">1183</tt> <a class="py-toggle" href="#" id="CppClass.add_method-toggle" onclick="return toggle('CppClass.add_method');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_method">add_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_method-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_method-expanded"><a name="L1184"></a><tt class="py-lineno">1184</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1185"></a><tt class="py-lineno">1185</tt>  <tt class="py-line"><tt class="py-docstring">        Add a method to the class. See the documentation for</tt> </tt>
<a name="L1186"></a><tt class="py-lineno">1186</tt>  <tt class="py-line"><tt class="py-docstring">        L{CppMethod.__init__} for information on accepted parameters.</tt> </tt>
<a name="L1187"></a><tt class="py-lineno">1187</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1188"></a><tt class="py-lineno">1188</tt>  <tt class="py-line"> </tt>
<a name="L1189"></a><tt class="py-lineno">1189</tt>  <tt class="py-line">        <tt class="py-comment">## &lt;compat&gt;</tt> </tt>
<a name="L1190"></a><tt class="py-lineno">1190</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-352" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-352', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1191"></a><tt class="py-lineno">1191</tt>  <tt class="py-line">            <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1192"></a><tt class="py-lineno">1192</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_method has changed API; see the API documentation"</tt><tt class="py-op">,</tt> </tt>
<a name="L1193"></a><tt class="py-lineno">1193</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1194"></a><tt class="py-lineno">1194</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L1195"></a><tt class="py-lineno">1195</tt>  <tt class="py-line">                <tt class="py-name">meth</tt><tt class="py-op">.</tt><tt id="link-353" class="py-name"><a title="pybindgen.cppmethod.CppMethod.custom_name" class="py-name" href="#" onclick="return doclink('link-353', 'custom_name', 'link-318');">custom_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1196"></a><tt class="py-lineno">1196</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'name'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
<a name="L1197"></a><tt class="py-lineno">1197</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1198"></a><tt class="py-lineno">1198</tt>  <tt class="py-line">                <tt class="py-name">meth</tt><tt class="py-op">.</tt><tt id="link-354" class="py-name"><a title="pybindgen.cppmethod.CppMethod.custom_name" class="py-name" href="#" onclick="return doclink('link-354', 'custom_name', 'link-318');">custom_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt> </tt>
<a name="L1199"></a><tt class="py-lineno">1199</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1200"></a><tt class="py-lineno">1200</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1201"></a><tt class="py-lineno">1201</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> </tt>
<a name="L1202"></a><tt class="py-lineno">1202</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-355" class="py-name"><a title="pybindgen.function" class="py-name" href="#" onclick="return doclink('link-355', 'function', 'link-315');">function</a></tt><tt class="py-op">.</tt><tt id="link-356" class="py-name"><a title="pybindgen.function.Function" class="py-name" href="#" onclick="return doclink('link-356', 'Function', 'link-316');">Function</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1203"></a><tt class="py-lineno">1203</tt>  <tt class="py-line">            <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1204"></a><tt class="py-lineno">1204</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_method has changed API; see the API documentation"</tt><tt class="py-op">,</tt> </tt>
<a name="L1205"></a><tt class="py-lineno">1205</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1206"></a><tt class="py-lineno">1206</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
<a name="L1207"></a><tt class="py-lineno">1207</tt>  <tt class="py-line">                <tt class="py-name">meth</tt><tt class="py-op">.</tt><tt id="link-357" class="py-name"><a title="pybindgen.cppmethod.CppMethod.custom_name" class="py-name" href="#" onclick="return doclink('link-357', 'custom_name', 'link-318');">custom_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L1208"></a><tt class="py-lineno">1208</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'name'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
<a name="L1209"></a><tt class="py-lineno">1209</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1210"></a><tt class="py-lineno">1210</tt>  <tt class="py-line">                <tt class="py-name">meth</tt><tt class="py-op">.</tt><tt id="link-358" class="py-name"><a title="pybindgen.cppmethod.CppMethod.custom_name" class="py-name" href="#" onclick="return doclink('link-358', 'custom_name', 'link-318');">custom_name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt> </tt>
<a name="L1211"></a><tt class="py-lineno">1211</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1212"></a><tt class="py-lineno">1212</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1213"></a><tt class="py-lineno">1213</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt> </tt>
<a name="L1214"></a><tt class="py-lineno">1214</tt>  <tt class="py-line">        <tt class="py-comment">## &lt;/compat&gt;</tt> </tt>
<a name="L1215"></a><tt class="py-lineno">1215</tt>  <tt class="py-line"> </tt>
<a name="L1216"></a><tt class="py-lineno">1216</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1217"></a><tt class="py-lineno">1217</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1218"></a><tt class="py-lineno">1218</tt>  <tt class="py-line">                <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt id="link-359" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-359', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1219"></a><tt class="py-lineno">1219</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-360" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-360', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-361" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-361', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1220"></a><tt class="py-lineno">1220</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">'is_virtual'</tt><tt class="py-op">,</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1221"></a><tt class="py-lineno">1221</tt>  <tt class="py-line">                    <tt class="py-comment">## if the method was supposed to be virtual, this</tt> </tt>
<a name="L1222"></a><tt class="py-lineno">1222</tt>  <tt class="py-line">                    <tt class="py-comment">## is a very important fact that needs to be</tt> </tt>
<a name="L1223"></a><tt class="py-lineno">1223</tt>  <tt class="py-line">                    <tt class="py-comment">## recorded in the class, even if the method is</tt> </tt>
<a name="L1224"></a><tt class="py-lineno">1224</tt>  <tt class="py-line">                    <tt class="py-comment">## not wrapped.</tt> </tt>
<a name="L1225"></a><tt class="py-lineno">1225</tt>  <tt class="py-line">                    <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt id="link-362" class="py-name"><a title="pybindgen.cppmethod.CppDummyMethod" class="py-name" href="#" onclick="return doclink('link-362', 'CppDummyMethod', 'link-71');">CppDummyMethod</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1226"></a><tt class="py-lineno">1226</tt>  <tt class="py-line">                    <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-363" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.class_
pybindgen.cppmethod.CppMethod.class_
pybindgen.cppmethod.CppVirtualMethodParentCaller.class_
pybindgen.cppmethod.CppVirtualMethodProxy.class_" class="py-name" href="#" onclick="return doclink('link-363', 'class_', 'link-64');">class_</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt> </tt>
<a name="L1227"></a><tt class="py-lineno">1227</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dummy_methods</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L1228"></a><tt class="py-lineno">1228</tt>  <tt class="py-line">                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_have_pure_virtual_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1229"></a><tt class="py-lineno">1229</tt>  <tt class="py-line">                    <tt id="link-364" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-364', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-365" class="py-name"><a title="pybindgen.cppclass.CppClass.get_helper_class
pybindgen.cppmethod.CppMethod.get_helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.get_helper_class" class="py-name" href="#" onclick="return doclink('link-365', 'get_helper_class', 'link-348');">get_helper_class</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1230"></a><tt class="py-lineno">1230</tt>  <tt class="py-line">                    <tt class="py-keyword">if</tt> <tt id="link-366" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-366', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1231"></a><tt class="py-lineno">1231</tt>  <tt class="py-line">                        <tt id="link-367" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-367', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-368" class="py-name"><a title="pybindgen.cppclass.CppHelperClass.add_virtual_method" class="py-name" href="#" onclick="return doclink('link-368', 'add_virtual_method', 'link-351');">add_virtual_method</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
<a name="L1232"></a><tt class="py-lineno">1232</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt id="link-369" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-369', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">:</tt> </tt>
<a name="L1233"></a><tt class="py-lineno">1233</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-370" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-370', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1234"></a><tt class="py-lineno">1234</tt>  <tt class="py-line">                            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_disabled</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1235"></a><tt class="py-lineno">1235</tt>  <tt class="py-line"> </tt>
<a name="L1236"></a><tt class="py-lineno">1236</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1237"></a><tt class="py-lineno">1237</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_method_obj</tt><tt class="py-op">(</tt><tt class="py-name">meth</tt><tt class="py-op">)</tt> </tt>
<a name="L1238"></a><tt class="py-lineno">1238</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">meth</tt> </tt>
</div><a name="L1239"></a><tt class="py-lineno">1239</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_function_as_method"></a><div id="CppClass.add_function_as_method-def"><a name="L1240"></a><tt class="py-lineno">1240</tt> <a class="py-toggle" href="#" id="CppClass.add_function_as_method-toggle" onclick="return toggle('CppClass.add_function_as_method');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_function_as_method">add_function_as_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_function_as_method-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_function_as_method-expanded"><a name="L1241"></a><tt class="py-lineno">1241</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1242"></a><tt class="py-lineno">1242</tt>  <tt class="py-line"><tt class="py-docstring">        Add a function as method of the class. See the documentation for</tt> </tt>
<a name="L1243"></a><tt class="py-lineno">1243</tt>  <tt class="py-line"><tt class="py-docstring">        L{Function.__init__} for information on accepted parameters.</tt> </tt>
<a name="L1244"></a><tt class="py-lineno">1244</tt>  <tt class="py-line"><tt class="py-docstring">        TODO: explain the implicit first function parameter</tt> </tt>
<a name="L1245"></a><tt class="py-lineno">1245</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1246"></a><tt class="py-lineno">1246</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1247"></a><tt class="py-lineno">1247</tt>  <tt class="py-line">            <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt id="link-371" class="py-name"><a title="pybindgen.function" class="py-name" href="#" onclick="return doclink('link-371', 'function', 'link-315');">function</a></tt><tt class="py-op">.</tt><tt id="link-372" class="py-name"><a title="pybindgen.function.Function" class="py-name" href="#" onclick="return doclink('link-372', 'Function', 'link-316');">Function</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1248"></a><tt class="py-lineno">1248</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-373" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-373', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-374" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-374', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1249"></a><tt class="py-lineno">1249</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1250"></a><tt class="py-lineno">1250</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_method_obj</tt><tt class="py-op">(</tt><tt class="py-name">meth</tt><tt class="py-op">)</tt> </tt>
<a name="L1251"></a><tt class="py-lineno">1251</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">meth</tt> </tt>
</div><a name="L1252"></a><tt class="py-lineno">1252</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_custom_method_wrapper"></a><div id="CppClass.add_custom_method_wrapper-def"><a name="L1253"></a><tt class="py-lineno">1253</tt> <a class="py-toggle" href="#" id="CppClass.add_custom_method_wrapper-toggle" onclick="return toggle('CppClass.add_custom_method_wrapper');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_custom_method_wrapper">add_custom_method_wrapper</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_custom_method_wrapper-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_custom_method_wrapper-expanded"><a name="L1254"></a><tt class="py-lineno">1254</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1255"></a><tt class="py-lineno">1255</tt>  <tt class="py-line"><tt class="py-docstring">        Adds a custom method wrapper. See L{CustomCppMethodWrapper} for more information.</tt> </tt>
<a name="L1256"></a><tt class="py-lineno">1256</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1257"></a><tt class="py-lineno">1257</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1258"></a><tt class="py-lineno">1258</tt>  <tt class="py-line">            <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt id="link-375" class="py-name" targets="Class pybindgen.cppmethod.CustomCppMethodWrapper=pybindgen.cppmethod.CustomCppMethodWrapper-class.html"><a title="pybindgen.cppmethod.CustomCppMethodWrapper" class="py-name" href="#" onclick="return doclink('link-375', 'CustomCppMethodWrapper', 'link-375');">CustomCppMethodWrapper</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1259"></a><tt class="py-lineno">1259</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-376" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-376', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-377" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-377', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1260"></a><tt class="py-lineno">1260</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1261"></a><tt class="py-lineno">1261</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_method_obj</tt><tt class="py-op">(</tt><tt class="py-name">meth</tt><tt class="py-op">)</tt> </tt>
<a name="L1262"></a><tt class="py-lineno">1262</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">meth</tt> </tt>
</div><a name="L1263"></a><tt class="py-lineno">1263</tt>  <tt class="py-line"> </tt>
<a name="CppClass.set_helper_class_disabled"></a><div id="CppClass.set_helper_class_disabled-def"><a name="L1264"></a><tt class="py-lineno">1264</tt> <a class="py-toggle" href="#" id="CppClass.set_helper_class_disabled-toggle" onclick="return toggle('CppClass.set_helper_class_disabled');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#set_helper_class_disabled">set_helper_class_disabled</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">flag</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.set_helper_class_disabled-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.set_helper_class_disabled-expanded"><a name="L1265"></a><tt class="py-lineno">1265</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_disabled</tt> <tt class="py-op">=</tt> <tt class="py-name">flag</tt> </tt>
<a name="L1266"></a><tt class="py-lineno">1266</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">flag</tt><tt class="py-op">:</tt> </tt>
<a name="L1267"></a><tt class="py-lineno">1267</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-378" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-378', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L1268"></a><tt class="py-lineno">1268</tt>  <tt class="py-line"> </tt>
<a name="CppClass.set_cannot_be_constructed"></a><div id="CppClass.set_cannot_be_constructed-def"><a name="L1269"></a><tt class="py-lineno">1269</tt> <a class="py-toggle" href="#" id="CppClass.set_cannot_be_constructed-toggle" onclick="return toggle('CppClass.set_cannot_be_constructed');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#set_cannot_be_constructed">set_cannot_be_constructed</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">reason</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.set_cannot_be_constructed-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.set_cannot_be_constructed-expanded"><a name="L1270"></a><tt class="py-lineno">1270</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">reason</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt> </tt>
<a name="L1271"></a><tt class="py-lineno">1271</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-name">reason</tt> </tt>
</div><a name="L1272"></a><tt class="py-lineno">1272</tt>  <tt class="py-line"> </tt>
<a name="CppClass._add_constructor_obj"></a><div id="CppClass._add_constructor_obj-def"><a name="L1273"></a><tt class="py-lineno">1273</tt> <a class="py-toggle" href="#" id="CppClass._add_constructor_obj-toggle" onclick="return toggle('CppClass._add_constructor_obj');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_add_constructor_obj">_add_constructor_obj</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wrapper</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._add_constructor_obj-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._add_constructor_obj-expanded"><a name="L1274"></a><tt class="py-lineno">1274</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1275"></a><tt class="py-lineno">1275</tt>  <tt class="py-line"><tt class="py-docstring">        Add a constructor to the class.</tt> </tt>
<a name="L1276"></a><tt class="py-lineno">1276</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1277"></a><tt class="py-lineno">1277</tt>  <tt class="py-line"><tt class="py-docstring">        @param wrapper: a CppConstructor instance</tt> </tt>
<a name="L1278"></a><tt class="py-lineno">1278</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1279"></a><tt class="py-lineno">1279</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">wrapper</tt><tt class="py-op">,</tt> <tt id="link-379" class="py-name" targets="Class pybindgen.cppmethod.CppConstructor=pybindgen.cppmethod.CppConstructor-class.html"><a title="pybindgen.cppmethod.CppConstructor" class="py-name" href="#" onclick="return doclink('link-379', 'CppConstructor', 'link-379');">CppConstructor</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1280"></a><tt class="py-lineno">1280</tt>  <tt class="py-line">        <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt id="link-380" class="py-name" targets="Method pybindgen.cppmethod.CppConstructor.set_class()=pybindgen.cppmethod.CppConstructor-class.html#set_class,Method pybindgen.cppmethod.CppMethod.set_class()=pybindgen.cppmethod.CppMethod-class.html#set_class"><a title="pybindgen.cppmethod.CppConstructor.set_class
pybindgen.cppmethod.CppMethod.set_class" class="py-name" href="#" onclick="return doclink('link-380', 'set_class', 'link-380');">set_class</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1281"></a><tt class="py-lineno">1281</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">wrapper</tt><tt class="py-op">)</tt> </tt>
<a name="L1282"></a><tt class="py-lineno">1282</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">:</tt> </tt>
<a name="L1283"></a><tt class="py-lineno">1283</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_trivial_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> <tt class="py-comment"># FIXME: I don't remember what is this used for anymore, maybe remove</tt> </tt>
<a name="L1284"></a><tt class="py-lineno">1284</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt id="link-381" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassRefParameter=pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassRefParameter" class="py-name" href="#" onclick="return doclink('link-381', 'CppClassRefParameter', 'link-381');">CppClassRefParameter</a></tt><tt class="py-op">,</tt> <tt id="link-382" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassParameter=pybindgen.cppclass_typehandlers.CppClassParameter-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassParameter" class="py-name" href="#" onclick="return doclink('link-382', 'CppClassParameter', 'link-382');">CppClassParameter</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> \ </tt>
<a name="L1285"></a><tt class="py-lineno">1285</tt>  <tt class="py-line">                <tt class="py-keyword">and</tt> <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-383" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassParameterBase.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassPtrReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassRefParameter.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValue.cpp_class
pybindgen.cppclass_typehandlers.CppClassReturnValueBase.cpp_class" class="py-name" href="#" onclick="return doclink('link-383', 'cpp_class', 'link-59');">cpp_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">self</tt> <tt class="py-keyword">and</tt> <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">visibility</tt> <tt class="py-op">==</tt> <tt class="py-string">'public'</tt><tt class="py-op">:</tt> </tt>
<a name="L1286"></a><tt class="py-lineno">1286</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_copy_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L1287"></a><tt class="py-lineno">1287</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_output_stream_operator"></a><div id="CppClass.add_output_stream_operator-def"><a name="L1288"></a><tt class="py-lineno">1288</tt> <a class="py-toggle" href="#" id="CppClass.add_output_stream_operator-toggle" onclick="return toggle('CppClass.add_output_stream_operator');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_output_stream_operator">add_output_stream_operator</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_output_stream_operator-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_output_stream_operator-expanded"><a name="L1289"></a><tt class="py-lineno">1289</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1290"></a><tt class="py-lineno">1290</tt>  <tt class="py-line"><tt class="py-docstring">        Add str() support based on C++ output stream operator.</tt> </tt>
<a name="L1291"></a><tt class="py-lineno">1291</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1292"></a><tt class="py-lineno">1292</tt>  <tt class="py-line"><tt class="py-docstring">        Calling this method enables wrapping of an assumed to be defined operator function::</tt> </tt>
<a name="L1293"></a><tt class="py-lineno">1293</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1294"></a><tt class="py-lineno">1294</tt>  <tt class="py-line"><tt class="py-docstring">             std::ostream &amp; operator &lt;&lt; (std::ostream &amp;, MyClass const &amp;);</tt> </tt>
<a name="L1295"></a><tt class="py-lineno">1295</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L1296"></a><tt class="py-lineno">1296</tt>  <tt class="py-line"><tt class="py-docstring">        The wrapper will be registered as an str() python operator,</tt> </tt>
<a name="L1297"></a><tt class="py-lineno">1297</tt>  <tt class="py-line"><tt class="py-docstring">        and will call the C++ operator function to convert the value</tt> </tt>
<a name="L1298"></a><tt class="py-lineno">1298</tt>  <tt class="py-line"><tt class="py-docstring">        to a string.</tt> </tt>
<a name="L1299"></a><tt class="py-lineno">1299</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1300"></a><tt class="py-lineno">1300</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_output_stream_operator</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1301"></a><tt class="py-lineno">1301</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-384" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-384', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-385" class="py-name"><a title="pybindgen.module.ModuleBase.add_include" class="py-name" href="#" onclick="return doclink('link-385', 'add_include', 'link-302');">add_include</a></tt><tt class="py-op">(</tt><tt class="py-string">"&lt;ostream&gt;"</tt><tt class="py-op">)</tt> </tt>
<a name="L1302"></a><tt class="py-lineno">1302</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-386" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-386', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-387" class="py-name"><a title="pybindgen.module.ModuleBase.add_include" class="py-name" href="#" onclick="return doclink('link-387', 'add_include', 'link-302');">add_include</a></tt><tt class="py-op">(</tt><tt class="py-string">"&lt;sstream&gt;"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1303"></a><tt class="py-lineno">1303</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_constructor"></a><div id="CppClass.add_constructor-def"><a name="L1304"></a><tt class="py-lineno">1304</tt> <a class="py-toggle" href="#" id="CppClass.add_constructor-toggle" onclick="return toggle('CppClass.add_constructor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_constructor">add_constructor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_constructor-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_constructor-expanded"><a name="L1305"></a><tt class="py-lineno">1305</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1306"></a><tt class="py-lineno">1306</tt>  <tt class="py-line"><tt class="py-docstring">        Add a constructor to the class. See the documentation for</tt> </tt>
<a name="L1307"></a><tt class="py-lineno">1307</tt>  <tt class="py-line"><tt class="py-docstring">        L{CppConstructor.__init__} for information on accepted parameters.</tt> </tt>
<a name="L1308"></a><tt class="py-lineno">1308</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1309"></a><tt class="py-lineno">1309</tt>  <tt class="py-line"> </tt>
<a name="L1310"></a><tt class="py-lineno">1310</tt>  <tt class="py-line">        <tt class="py-comment">## &lt;compat&gt;</tt> </tt>
<a name="L1311"></a><tt class="py-lineno">1311</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-388" class="py-name"><a title="pybindgen.cppmethod.CppConstructor" class="py-name" href="#" onclick="return doclink('link-388', 'CppConstructor', 'link-379');">CppConstructor</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1312"></a><tt class="py-lineno">1312</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_constructor has changed API; see the API documentation"</tt><tt class="py-op">,</tt> </tt>
<a name="L1313"></a><tt class="py-lineno">1313</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1314"></a><tt class="py-lineno">1314</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1315"></a><tt class="py-lineno">1315</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt id="link-389" class="py-name"><a title="pybindgen.function" class="py-name" href="#" onclick="return doclink('link-389', 'function', 'link-315');">function</a></tt><tt class="py-op">.</tt><tt id="link-390" class="py-name"><a title="pybindgen.function.Function" class="py-name" href="#" onclick="return doclink('link-390', 'Function', 'link-316');">Function</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1316"></a><tt class="py-lineno">1316</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_constructor has changed API; see the API documentation"</tt><tt class="py-op">,</tt> </tt>
<a name="L1317"></a><tt class="py-lineno">1317</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1318"></a><tt class="py-lineno">1318</tt>  <tt class="py-line">            <tt class="py-name">func</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1319"></a><tt class="py-lineno">1319</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt id="link-391" class="py-name" targets="Class pybindgen.cppmethod.CppFunctionAsConstructor=pybindgen.cppmethod.CppFunctionAsConstructor-class.html"><a title="pybindgen.cppmethod.CppFunctionAsConstructor" class="py-name" href="#" onclick="return doclink('link-391', 'CppFunctionAsConstructor', 'link-391');">CppFunctionAsConstructor</a></tt><tt class="py-op">(</tt><tt class="py-name">func</tt><tt class="py-op">.</tt><tt class="py-name">function_name</tt><tt class="py-op">,</tt> <tt class="py-name">func</tt><tt class="py-op">.</tt><tt class="py-name">parameters</tt><tt class="py-op">)</tt> </tt>
<a name="L1320"></a><tt class="py-lineno">1320</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt><tt class="py-op">.</tt><tt id="link-392" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-392', 'module', 'link-237');">module</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-393" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-393', 'module', 'link-237');">module</a></tt> </tt>
<a name="L1321"></a><tt class="py-lineno">1321</tt>  <tt class="py-line">        <tt class="py-comment">## &lt;/compat&gt;</tt> </tt>
<a name="L1322"></a><tt class="py-lineno">1322</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1323"></a><tt class="py-lineno">1323</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1324"></a><tt class="py-lineno">1324</tt>  <tt class="py-line">                <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt id="link-394" class="py-name"><a title="pybindgen.cppmethod.CppConstructor" class="py-name" href="#" onclick="return doclink('link-394', 'CppConstructor', 'link-379');">CppConstructor</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1325"></a><tt class="py-lineno">1325</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-395" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-395', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-396" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-396', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1326"></a><tt class="py-lineno">1326</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1327"></a><tt class="py-lineno">1327</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_constructor_obj</tt><tt class="py-op">(</tt><tt class="py-name">constructor</tt><tt class="py-op">)</tt> </tt>
<a name="L1328"></a><tt class="py-lineno">1328</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">constructor</tt> </tt>
</div><a name="L1329"></a><tt class="py-lineno">1329</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_copy_constructor"></a><div id="CppClass.add_copy_constructor-def"><a name="L1330"></a><tt class="py-lineno">1330</tt> <a class="py-toggle" href="#" id="CppClass.add_copy_constructor-toggle" onclick="return toggle('CppClass.add_copy_constructor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_copy_constructor">add_copy_constructor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_copy_constructor-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_copy_constructor-expanded"><a name="L1331"></a><tt class="py-lineno">1331</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1332"></a><tt class="py-lineno">1332</tt>  <tt class="py-line"><tt class="py-docstring">        Utility method to add a 'copy constructor' method to this class.</tt> </tt>
<a name="L1333"></a><tt class="py-lineno">1333</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1334"></a><tt class="py-lineno">1334</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1335"></a><tt class="py-lineno">1335</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt id="link-397" class="py-name"><a title="pybindgen.cppmethod.CppConstructor" class="py-name" href="#" onclick="return doclink('link-397', 'CppConstructor', 'link-379');">CppConstructor</a></tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassRefParameter</tt><tt class="py-op">(</tt><tt class="py-string">"const %s &amp;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1336"></a><tt class="py-lineno">1336</tt>  <tt class="py-line">                                                                     <tt class="py-string">'ctor_arg'</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1337"></a><tt class="py-lineno">1337</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-398" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-398', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-399" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-399', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1338"></a><tt class="py-lineno">1338</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1339"></a><tt class="py-lineno">1339</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_constructor_obj</tt><tt class="py-op">(</tt><tt class="py-name">constructor</tt><tt class="py-op">)</tt> </tt>
<a name="L1340"></a><tt class="py-lineno">1340</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">constructor</tt> </tt>
</div><a name="L1341"></a><tt class="py-lineno">1341</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_function_as_constructor"></a><div id="CppClass.add_function_as_constructor-def"><a name="L1342"></a><tt class="py-lineno">1342</tt> <a class="py-toggle" href="#" id="CppClass.add_function_as_constructor-toggle" onclick="return toggle('CppClass.add_function_as_constructor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_function_as_constructor">add_function_as_constructor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_function_as_constructor-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_function_as_constructor-expanded"><a name="L1343"></a><tt class="py-lineno">1343</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1344"></a><tt class="py-lineno">1344</tt>  <tt class="py-line"><tt class="py-docstring">        Wrap a function that behaves as a constructor to the class. See the documentation for</tt> </tt>
<a name="L1345"></a><tt class="py-lineno">1345</tt>  <tt class="py-line"><tt class="py-docstring">        L{CppFunctionAsConstructor.__init__} for information on accepted parameters.</tt> </tt>
<a name="L1346"></a><tt class="py-lineno">1346</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1347"></a><tt class="py-lineno">1347</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1348"></a><tt class="py-lineno">1348</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt id="link-400" class="py-name"><a title="pybindgen.cppmethod.CppFunctionAsConstructor" class="py-name" href="#" onclick="return doclink('link-400', 'CppFunctionAsConstructor', 'link-391');">CppFunctionAsConstructor</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
<a name="L1349"></a><tt class="py-lineno">1349</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-401" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-401', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-402" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-402', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1350"></a><tt class="py-lineno">1350</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">None</tt> </tt>
<a name="L1351"></a><tt class="py-lineno">1351</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_constructor_obj</tt><tt class="py-op">(</tt><tt class="py-name">constructor</tt><tt class="py-op">)</tt> </tt>
<a name="L1352"></a><tt class="py-lineno">1352</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">constructor</tt> </tt>
</div><a name="L1353"></a><tt class="py-lineno">1353</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_static_attribute"></a><div id="CppClass.add_static_attribute-def"><a name="L1354"></a><tt class="py-lineno">1354</tt> <a class="py-toggle" href="#" id="CppClass.add_static_attribute-toggle" onclick="return toggle('CppClass.add_static_attribute');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_static_attribute">add_static_attribute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">value_type</tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_static_attribute-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_static_attribute-expanded"><a name="L1355"></a><tt class="py-lineno">1355</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1356"></a><tt class="py-lineno">1356</tt>  <tt class="py-line"><tt class="py-docstring">        @param value_type: a ReturnValue object</tt> </tt>
<a name="L1357"></a><tt class="py-lineno">1357</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: attribute name (i.e. the name of the class member variable)</tt> </tt>
<a name="L1358"></a><tt class="py-lineno">1358</tt>  <tt class="py-line"><tt class="py-docstring">        @param is_const: True if the attribute is const, i.e. cannot be modified</tt> </tt>
<a name="L1359"></a><tt class="py-lineno">1359</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1360"></a><tt class="py-lineno">1360</tt>  <tt class="py-line"> </tt>
<a name="L1361"></a><tt class="py-lineno">1361</tt>  <tt class="py-line">        <tt class="py-comment">## backward compatibility check</tt> </tt>
<a name="L1362"></a><tt class="py-lineno">1362</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-403" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-403', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt id="link-404" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-404', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1363"></a><tt class="py-lineno">1363</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_static_attribute has changed API; see the API documentation (but trying to correct...)"</tt><tt class="py-op">,</tt> </tt>
<a name="L1364"></a><tt class="py-lineno">1364</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1365"></a><tt class="py-lineno">1365</tt>  <tt class="py-line">            <tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt id="link-405" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-405', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-406" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-406', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">value_type</tt> </tt>
<a name="L1366"></a><tt class="py-lineno">1366</tt>  <tt class="py-line"> </tt>
<a name="L1367"></a><tt class="py-lineno">1367</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1368"></a><tt class="py-lineno">1368</tt>  <tt class="py-line">            <tt class="py-name">value_type</tt> <tt class="py-op">=</tt> <tt id="link-407" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-407', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-408" class="py-name" targets="Function pybindgen.utils.eval_retval()=pybindgen.utils-module.html#eval_retval"><a title="pybindgen.utils.eval_retval" class="py-name" href="#" onclick="return doclink('link-408', 'eval_retval', 'link-408');">eval_retval</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1369"></a><tt class="py-lineno">1369</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-409" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-409', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-410" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-410', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1370"></a><tt class="py-lineno">1370</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1371"></a><tt class="py-lineno">1371</tt>  <tt class="py-line"> </tt>
<a name="L1372"></a><tt class="py-lineno">1372</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt id="link-411" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-411', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1373"></a><tt class="py-lineno">1373</tt>  <tt class="py-line">        <tt class="py-name">getter</tt> <tt class="py-op">=</tt> <tt id="link-412" class="py-name"><a title="pybindgen.cppattribute.CppStaticAttributeGetter" class="py-name" href="#" onclick="return doclink('link-412', 'CppStaticAttributeGetter', 'link-18');">CppStaticAttributeGetter</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-413" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-413', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1374"></a><tt class="py-lineno">1374</tt>  <tt class="py-line">        <tt class="py-name">getter</tt><tt class="py-op">.</tt><tt class="py-name">stack_where_defined</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">extract_stack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1375"></a><tt class="py-lineno">1375</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">is_const</tt><tt class="py-op">:</tt> </tt>
<a name="L1376"></a><tt class="py-lineno">1376</tt>  <tt class="py-line">            <tt class="py-name">setter</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1377"></a><tt class="py-lineno">1377</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1378"></a><tt class="py-lineno">1378</tt>  <tt class="py-line">            <tt class="py-name">setter</tt> <tt class="py-op">=</tt> <tt id="link-414" class="py-name"><a title="pybindgen.cppattribute.CppStaticAttributeSetter" class="py-name" href="#" onclick="return doclink('link-414', 'CppStaticAttributeSetter', 'link-19');">CppStaticAttributeSetter</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-415" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-415', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1379"></a><tt class="py-lineno">1379</tt>  <tt class="py-line">            <tt class="py-name">setter</tt><tt class="py-op">.</tt><tt class="py-name">stack_where_defined</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">extract_stack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1380"></a><tt class="py-lineno">1380</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt><tt class="py-op">.</tt><tt id="link-416" class="py-name" targets="Method pybindgen.cppattribute.PyGetSetDef.add_attribute()=pybindgen.cppattribute.PyGetSetDef-class.html#add_attribute"><a title="pybindgen.cppattribute.PyGetSetDef.add_attribute" class="py-name" href="#" onclick="return doclink('link-416', 'add_attribute', 'link-416');">add_attribute</a></tt><tt class="py-op">(</tt><tt id="link-417" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-417', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">getter</tt><tt class="py-op">,</tt> <tt class="py-name">setter</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1381"></a><tt class="py-lineno">1381</tt>  <tt class="py-line"> </tt>
<a name="CppClass.add_instance_attribute"></a><div id="CppClass.add_instance_attribute-def"><a name="L1382"></a><tt class="py-lineno">1382</tt> <a class="py-toggle" href="#" id="CppClass.add_instance_attribute-toggle" onclick="return toggle('CppClass.add_instance_attribute');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#add_instance_attribute">add_instance_attribute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">value_type</tt><tt class="py-op">,</tt> <tt class="py-param">is_const</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> </tt>
<a name="L1383"></a><tt class="py-lineno">1383</tt>  <tt class="py-line">                               <tt class="py-param">getter</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">setter</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.add_instance_attribute-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.add_instance_attribute-expanded"><a name="L1384"></a><tt class="py-lineno">1384</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1385"></a><tt class="py-lineno">1385</tt>  <tt class="py-line"><tt class="py-docstring">        @param value_type: a ReturnValue object</tt> </tt>
<a name="L1386"></a><tt class="py-lineno">1386</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: attribute name (i.e. the name of the class member variable)</tt> </tt>
<a name="L1387"></a><tt class="py-lineno">1387</tt>  <tt class="py-line"><tt class="py-docstring">        @param is_const: True if the attribute is const, i.e. cannot be modified</tt> </tt>
<a name="L1388"></a><tt class="py-lineno">1388</tt>  <tt class="py-line"><tt class="py-docstring">        @param getter: None, or name of a method of this class used to get the value</tt> </tt>
<a name="L1389"></a><tt class="py-lineno">1389</tt>  <tt class="py-line"><tt class="py-docstring">        @param setter: None, or name of a method of this class used to set the value</tt> </tt>
<a name="L1390"></a><tt class="py-lineno">1390</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1391"></a><tt class="py-lineno">1391</tt>  <tt class="py-line"> </tt>
<a name="L1392"></a><tt class="py-lineno">1392</tt>  <tt class="py-line">        <tt class="py-comment">## backward compatibility check</tt> </tt>
<a name="L1393"></a><tt class="py-lineno">1393</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt id="link-418" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-418', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt id="link-419" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-419', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1394"></a><tt class="py-lineno">1394</tt>  <tt class="py-line">            <tt class="py-name">warnings</tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"add_static_attribute has changed API; see the API documentation (but trying to correct...)"</tt><tt class="py-op">,</tt> </tt>
<a name="L1395"></a><tt class="py-lineno">1395</tt>  <tt class="py-line">                          <tt class="py-name">DeprecationWarning</tt><tt class="py-op">,</tt> <tt class="py-name">stacklevel</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L1396"></a><tt class="py-lineno">1396</tt>  <tt class="py-line">            <tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt id="link-420" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-420', 'name', 'link-66');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-421" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-421', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">value_type</tt> </tt>
<a name="L1397"></a><tt class="py-lineno">1397</tt>  <tt class="py-line"> </tt>
<a name="L1398"></a><tt class="py-lineno">1398</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1399"></a><tt class="py-lineno">1399</tt>  <tt class="py-line">            <tt class="py-name">value_type</tt> <tt class="py-op">=</tt> <tt id="link-422" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-422', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-423" class="py-name"><a title="pybindgen.utils.eval_retval" class="py-name" href="#" onclick="return doclink('link-423', 'eval_retval', 'link-408');">eval_retval</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1400"></a><tt class="py-lineno">1400</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt id="link-424" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-424', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-425" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-425', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1401"></a><tt class="py-lineno">1401</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1402"></a><tt class="py-lineno">1402</tt>  <tt class="py-line"> </tt>
<a name="L1403"></a><tt class="py-lineno">1403</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt id="link-426" class="py-name"><a title="pybindgen.typehandlers.base.ReturnValue" class="py-name" href="#" onclick="return doclink('link-426', 'ReturnValue', 'link-3');">ReturnValue</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1404"></a><tt class="py-lineno">1404</tt>  <tt class="py-line">        <tt class="py-name">getter_wrapper</tt> <tt class="py-op">=</tt> <tt id="link-427" class="py-name"><a title="pybindgen.cppattribute.CppInstanceAttributeGetter" class="py-name" href="#" onclick="return doclink('link-427', 'CppInstanceAttributeGetter', 'link-16');">CppInstanceAttributeGetter</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-428" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-428', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">getter</tt><tt class="py-op">=</tt><tt class="py-name">getter</tt><tt class="py-op">)</tt> </tt>
<a name="L1405"></a><tt class="py-lineno">1405</tt>  <tt class="py-line">        <tt class="py-name">getter_wrapper</tt><tt class="py-op">.</tt><tt class="py-name">stack_where_defined</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">extract_stack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1406"></a><tt class="py-lineno">1406</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">is_const</tt><tt class="py-op">:</tt> </tt>
<a name="L1407"></a><tt class="py-lineno">1407</tt>  <tt class="py-line">            <tt class="py-name">setter_wrapper</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1408"></a><tt class="py-lineno">1408</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">setter</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> </tt>
<a name="L1409"></a><tt class="py-lineno">1409</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1410"></a><tt class="py-lineno">1410</tt>  <tt class="py-line">            <tt class="py-name">setter_wrapper</tt> <tt class="py-op">=</tt> <tt id="link-429" class="py-name"><a title="pybindgen.cppattribute.CppInstanceAttributeSetter" class="py-name" href="#" onclick="return doclink('link-429', 'CppInstanceAttributeSetter', 'link-17');">CppInstanceAttributeSetter</a></tt><tt class="py-op">(</tt><tt class="py-name">value_type</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-430" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-430', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">setter</tt><tt class="py-op">=</tt><tt class="py-name">setter</tt><tt class="py-op">)</tt> </tt>
<a name="L1411"></a><tt class="py-lineno">1411</tt>  <tt class="py-line">            <tt class="py-name">setter_wrapper</tt><tt class="py-op">.</tt><tt class="py-name">stack_where_defined</tt> <tt class="py-op">=</tt> <tt class="py-name">traceback</tt><tt class="py-op">.</tt><tt class="py-name">extract_stack</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1412"></a><tt class="py-lineno">1412</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_attributes</tt><tt class="py-op">.</tt><tt id="link-431" class="py-name"><a title="pybindgen.cppattribute.PyGetSetDef.add_attribute" class="py-name" href="#" onclick="return doclink('link-431', 'add_attribute', 'link-416');">add_attribute</a></tt><tt class="py-op">(</tt><tt id="link-432" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-432', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">getter_wrapper</tt><tt class="py-op">,</tt> <tt class="py-name">setter_wrapper</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1413"></a><tt class="py-lineno">1413</tt>  <tt class="py-line"> </tt>
<a name="L1414"></a><tt class="py-lineno">1414</tt>  <tt class="py-line"> </tt>
<a name="CppClass._inherit_helper_class_parent_virtuals"></a><div id="CppClass._inherit_helper_class_parent_virtuals-def"><a name="L1415"></a><tt class="py-lineno">1415</tt> <a class="py-toggle" href="#" id="CppClass._inherit_helper_class_parent_virtuals-toggle" onclick="return toggle('CppClass._inherit_helper_class_parent_virtuals');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_inherit_helper_class_parent_virtuals">_inherit_helper_class_parent_virtuals</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._inherit_helper_class_parent_virtuals-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._inherit_helper_class_parent_virtuals-expanded"><a name="L1416"></a><tt class="py-lineno">1416</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1417"></a><tt class="py-lineno">1417</tt>  <tt class="py-line"><tt class="py-docstring">        Given a class containing a helper class, add all virtual</tt> </tt>
<a name="L1418"></a><tt class="py-lineno">1418</tt>  <tt class="py-line"><tt class="py-docstring">        methods from the all parent classes of this class.</tt> </tt>
<a name="L1419"></a><tt class="py-lineno">1419</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1420"></a><tt class="py-lineno">1420</tt>  <tt class="py-line">        <tt class="py-name">mro</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-433" class="py-name"><a title="pybindgen.cppclass.CppClass.get_mro" class="py-name" href="#" onclick="return doclink('link-433', 'get_mro', 'link-241');">get_mro</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1421"></a><tt class="py-lineno">1421</tt>  <tt class="py-line">        <tt class="py-name">mro</tt><tt class="py-op">.</tt><tt class="py-name">next</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># skip 'self'</tt> </tt>
<a name="L1422"></a><tt class="py-lineno">1422</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">mro</tt><tt class="py-op">:</tt> </tt>
<a name="L1423"></a><tt class="py-lineno">1423</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">method</tt> <tt class="py-keyword">in</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-434" class="py-name"><a title="pybindgen.cppclass.CppClass.get_all_methods" class="py-name" href="#" onclick="return doclink('link-434', 'get_all_methods', 'link-242');">get_all_methods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1424"></a><tt class="py-lineno">1424</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt class="py-name">is_virtual</tt><tt class="py-op">:</tt> </tt>
<a name="L1425"></a><tt class="py-lineno">1425</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1426"></a><tt class="py-lineno">1426</tt>  <tt class="py-line">                <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">method</tt><tt class="py-op">.</tt><tt id="link-435" class="py-name"><a title="pybindgen.cppmethod.CppConstructor.clone
pybindgen.cppmethod.CppMethod.clone
pybindgen.cppmethod.CppVirtualMethodParentCaller.clone
pybindgen.function.Function.clone
pybindgen.typehandlers.ctypeparser.CType.clone" class="py-name" href="#" onclick="return doclink('link-435', 'clone', 'link-344');">clone</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1427"></a><tt class="py-lineno">1427</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-436" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-436', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-437" class="py-name"><a title="pybindgen.cppclass.CppHelperClass.add_virtual_method" class="py-name" href="#" onclick="return doclink('link-437', 'add_virtual_method', 'link-351');">add_virtual_method</a></tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1428"></a><tt class="py-lineno">1428</tt>  <tt class="py-line"> </tt>
<a name="CppClass._get_wrapper_registry"></a><div id="CppClass._get_wrapper_registry-def"><a name="L1429"></a><tt class="py-lineno">1429</tt> <a class="py-toggle" href="#" id="CppClass._get_wrapper_registry-toggle" onclick="return toggle('CppClass._get_wrapper_registry');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_get_wrapper_registry">_get_wrapper_registry</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._get_wrapper_registry-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._get_wrapper_registry-expanded"><a name="L1430"></a><tt class="py-lineno">1430</tt>  <tt class="py-line">        <tt class="py-comment"># there is one wrapper registry object per root class only,</tt> </tt>
<a name="L1431"></a><tt class="py-lineno">1431</tt>  <tt class="py-line">        <tt class="py-comment"># which is used for all subclasses.</tt> </tt>
<a name="L1432"></a><tt class="py-lineno">1432</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1433"></a><tt class="py-lineno">1433</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_wrapper_registry</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1434"></a><tt class="py-lineno">1434</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_wrapper_registry</tt> <tt class="py-op">=</tt> <tt id="link-438" class="py-name"><a title="pybindgen.settings" class="py-name" href="#" onclick="return doclink('link-438', 'settings', 'link-26');">settings</a></tt><tt class="py-op">.</tt><tt id="link-439" class="py-name" targets="Variable pybindgen.cppclass.CppClass.wrapper_registry=pybindgen.cppclass.CppClass-class.html#wrapper_registry,Module pybindgen.wrapper_registry=pybindgen.wrapper_registry-module.html"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-439', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-440" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-440', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1435"></a><tt class="py-lineno">1435</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_wrapper_registry</tt> </tt>
<a name="L1436"></a><tt class="py-lineno">1436</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1437"></a><tt class="py-lineno">1437</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt id="link-441" class="py-name" targets="Method pybindgen.cppclass.CppClass._get_wrapper_registry()=pybindgen.cppclass.CppClass-class.html#_get_wrapper_registry"><a title="pybindgen.cppclass.CppClass._get_wrapper_registry" class="py-name" href="#" onclick="return doclink('link-441', '_get_wrapper_registry', 'link-441');">_get_wrapper_registry</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1438"></a><tt class="py-lineno">1438</tt>  <tt class="py-line">    <tt id="link-442" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-442', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-443" class="py-name"><a title="pybindgen.cppclass.CppClass._get_wrapper_registry" class="py-name" href="#" onclick="return doclink('link-443', '_get_wrapper_registry', 'link-441');">_get_wrapper_registry</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1439"></a><tt class="py-lineno">1439</tt>  <tt class="py-line"> </tt>
<a name="CppClass.generate_forward_declarations"></a><div id="CppClass.generate_forward_declarations-def"><a name="L1440"></a><tt class="py-lineno">1440</tt> <a class="py-toggle" href="#" id="CppClass.generate_forward_declarations-toggle" onclick="return toggle('CppClass.generate_forward_declarations');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#generate_forward_declarations">generate_forward_declarations</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.generate_forward_declarations-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.generate_forward_declarations-expanded"><a name="L1441"></a><tt class="py-lineno">1441</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L1442"></a><tt class="py-lineno">1442</tt>  <tt class="py-line"><tt class="py-docstring">        Generates forward declarations for the instance and type</tt> </tt>
<a name="L1443"></a><tt class="py-lineno">1443</tt>  <tt class="py-line"><tt class="py-docstring">        structures.</tt> </tt>
<a name="L1444"></a><tt class="py-lineno">1444</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L1445"></a><tt class="py-lineno">1445</tt>  <tt class="py-line"> </tt>
<a name="L1446"></a><tt class="py-lineno">1446</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-444" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-444', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1447"></a><tt class="py-lineno">1447</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-445" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-445', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1448"></a><tt class="py-lineno">1448</tt>  <tt class="py-line"><tt class="py-string">typedef struct {</tt> </tt>
<a name="L1449"></a><tt class="py-lineno">1449</tt>  <tt class="py-line"><tt class="py-string">    PyObject_HEAD</tt> </tt>
<a name="L1450"></a><tt class="py-lineno">1450</tt>  <tt class="py-line"><tt class="py-string">    %s *obj;</tt> </tt>
<a name="L1451"></a><tt class="py-lineno">1451</tt>  <tt class="py-line"><tt class="py-string">    PyObject *inst_dict;</tt> </tt>
<a name="L1452"></a><tt class="py-lineno">1452</tt>  <tt class="py-line"><tt class="py-string">} %s;</tt> </tt>
<a name="L1453"></a><tt class="py-lineno">1453</tt>  <tt class="py-line"><tt class="py-string">    '''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-446" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-446', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1454"></a><tt class="py-lineno">1454</tt>  <tt class="py-line"> </tt>
<a name="L1455"></a><tt class="py-lineno">1455</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1456"></a><tt class="py-lineno">1456</tt>  <tt class="py-line"> </tt>
<a name="L1457"></a><tt class="py-lineno">1457</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-447" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-447', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1458"></a><tt class="py-lineno">1458</tt>  <tt class="py-line"><tt class="py-string">typedef struct {</tt> </tt>
<a name="L1459"></a><tt class="py-lineno">1459</tt>  <tt class="py-line"><tt class="py-string">    PyObject_HEAD</tt> </tt>
<a name="L1460"></a><tt class="py-lineno">1460</tt>  <tt class="py-line"><tt class="py-string">    %s *obj;</tt> </tt>
<a name="L1461"></a><tt class="py-lineno">1461</tt>  <tt class="py-line"><tt class="py-string">} %s;</tt> </tt>
<a name="L1462"></a><tt class="py-lineno">1462</tt>  <tt class="py-line"><tt class="py-string">    '''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-448" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-448', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1463"></a><tt class="py-lineno">1463</tt>  <tt class="py-line"> </tt>
<a name="L1464"></a><tt class="py-lineno">1464</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-449" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-449', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1465"></a><tt class="py-lineno">1465</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-450" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-450', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'extern PyTypeObject %s;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1466"></a><tt class="py-lineno">1466</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt><tt class="py-op">.</tt><tt id="link-451" class="py-name" targets="Method pybindgen.cppattribute.PyGetSetDef.empty()=pybindgen.cppattribute.PyGetSetDef-class.html#empty"><a title="pybindgen.cppattribute.PyGetSetDef.empty" class="py-name" href="#" onclick="return doclink('link-451', 'empty', 'link-451');">empty</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1467"></a><tt class="py-lineno">1467</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-452" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-452', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'extern PyTypeObject Py%s_Type;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1468"></a><tt class="py-lineno">1468</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-453" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-453', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1469"></a><tt class="py-lineno">1469</tt>  <tt class="py-line"> </tt>
<a name="L1470"></a><tt class="py-lineno">1470</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-454" class="py-name"><a title="pybindgen.settings.automatic_type_narrowing" class="py-name" href="#" onclick="return doclink('link-454', 'automatic_type_narrowing', 'link-183');">automatic_type_narrowing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1471"></a><tt class="py-lineno">1471</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_register_typeid</tt><tt class="py-op">(</tt><tt id="link-455" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-455', 'module', 'link-237');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1472"></a><tt class="py-lineno">1472</tt>  <tt class="py-line"> </tt>
<a name="L1473"></a><tt class="py-lineno">1473</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-456" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-456', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1474"></a><tt class="py-lineno">1474</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_inherit_helper_class_parent_virtuals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1475"></a><tt class="py-lineno">1475</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">hook</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_get_all_helper_class_hooks</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1476"></a><tt class="py-lineno">1476</tt>  <tt class="py-line">                <tt class="py-name">hook</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-457" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-457', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1477"></a><tt class="py-lineno">1477</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-458" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-458', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-459" class="py-name" targets="Method pybindgen.container.Container.generate_forward_declarations()=pybindgen.container.Container-class.html#generate_forward_declarations,Method pybindgen.cppclass.CppClass.generate_forward_declarations()=pybindgen.cppclass.CppClass-class.html#generate_forward_declarations,Method pybindgen.cppclass.CppHelperClass.generate_forward_declarations()=pybindgen.cppclass.CppHelperClass-class.html#generate_forward_declarations,Method pybindgen.module.ModuleBase.generate_forward_declarations()=pybindgen.module.ModuleBase-class.html#generate_forward_declarations,Method pybindgen.wrapper_registry.NullWrapperRegistry.generate_forward_declarations()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#generate_forward_declarations,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.generate_forward_declarations()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#generate_forward_declarations,Method pybindgen.wrapper_registry.WrapperRegistry.generate_forward_declarations()=pybindgen.wrapper_registry.WrapperRegistry-class.html#generate_forward_declarations"><a title="pybindgen.container.Container.generate_forward_declarations
pybindgen.cppclass.CppClass.generate_forward_declarations
pybindgen.cppclass.CppHelperClass.generate_forward_declarations
pybindgen.module.ModuleBase.generate_forward_declarations
pybindgen.wrapper_registry.NullWrapperRegistry.generate_forward_declarations
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate_forward_declarations
pybindgen.wrapper_registry.WrapperRegistry.generate_forward_declarations" class="py-name" href="#" onclick="return doclink('link-459', 'generate_forward_declarations', 'link-459');">generate_forward_declarations</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1478"></a><tt class="py-lineno">1478</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-460" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-460', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">:</tt> </tt>
<a name="L1479"></a><tt class="py-lineno">1479</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-461" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-461', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1480"></a><tt class="py-lineno">1480</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">helper_class_disabled</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1481"></a><tt class="py-lineno">1481</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-462" class="py-name"><a title="pybindgen.cppclass.CppClass.have_pure_virtual_methods" class="py-name" href="#" onclick="return doclink('link-462', 'have_pure_virtual_methods', 'link-247');">have_pure_virtual_methods</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-463" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-463', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1482"></a><tt class="py-lineno">1482</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt> <tt class="py-op">=</tt> <tt class="py-string">"have pure virtual methods but no helper class"</tt> </tt>
<a name="L1483"></a><tt class="py-lineno">1483</tt>  <tt class="py-line"> </tt>
<a name="L1484"></a><tt class="py-lineno">1484</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1485"></a><tt class="py-lineno">1485</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_typeid_map</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt id="link-464" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-464', 'module', 'link-237');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1486"></a><tt class="py-lineno">1486</tt>  <tt class="py-line"> </tt>
<a name="L1487"></a><tt class="py-lineno">1487</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1488"></a><tt class="py-lineno">1488</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-465" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-465', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt><tt class="py-op">.</tt><tt id="link-466" class="py-name"><a title="pybindgen.container.Container.generate_forward_declarations
pybindgen.cppclass.CppClass.generate_forward_declarations
pybindgen.cppclass.CppHelperClass.generate_forward_declarations
pybindgen.module.ModuleBase.generate_forward_declarations
pybindgen.wrapper_registry.NullWrapperRegistry.generate_forward_declarations
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate_forward_declarations
pybindgen.wrapper_registry.WrapperRegistry.generate_forward_declarations" class="py-name" href="#" onclick="return doclink('link-466', 'generate_forward_declarations', 'link-459');">generate_forward_declarations</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt id="link-467" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-467', 'module', 'link-237');">module</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L1489"></a><tt class="py-lineno">1489</tt>  <tt class="py-line"> </tt>
<a name="CppClass.generate"></a><div id="CppClass.generate-def"><a name="L1490"></a><tt class="py-lineno">1490</tt> <a class="py-toggle" href="#" id="CppClass.generate-toggle" onclick="return toggle('CppClass.generate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#generate">generate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.generate-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.generate-expanded"><a name="L1491"></a><tt class="py-lineno">1491</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generates the class to a code sink"""</tt> </tt>
<a name="L1492"></a><tt class="py-lineno">1492</tt>  <tt class="py-line"> </tt>
<a name="L1493"></a><tt class="py-lineno">1493</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1494"></a><tt class="py-lineno">1494</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-468" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-468', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"\npybindgen::TypeMap %s;\n"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">typeid_map_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1495"></a><tt class="py-lineno">1495</tt>  <tt class="py-line"> </tt>
<a name="L1496"></a><tt class="py-lineno">1496</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1497"></a><tt class="py-lineno">1497</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-469" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-469', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt><tt class="py-op">.</tt><tt id="link-470" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-470', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt id="link-471" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-471', 'module', 'link-237');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1498"></a><tt class="py-lineno">1498</tt>  <tt class="py-line"> </tt>
<a name="L1499"></a><tt class="py-lineno">1499</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-472" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-472', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1500"></a><tt class="py-lineno">1500</tt>  <tt class="py-line">            <tt class="py-name">parent_caller_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-473" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-473', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-474" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-474', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1501"></a><tt class="py-lineno">1501</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1502"></a><tt class="py-lineno">1502</tt>  <tt class="py-line">            <tt class="py-name">parent_caller_methods</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1503"></a><tt class="py-lineno">1503</tt>  <tt class="py-line"> </tt>
<a name="L1504"></a><tt class="py-lineno">1504</tt>  <tt class="py-line">        <tt class="py-comment">## generate getsets</tt> </tt>
<a name="L1505"></a><tt class="py-lineno">1505</tt>  <tt class="py-line">        <tt class="py-name">instance_getsets</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">instance_attributes</tt><tt class="py-op">.</tt><tt id="link-475" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-475', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1506"></a><tt class="py-lineno">1506</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_getset"</tt><tt class="py-op">,</tt> <tt class="py-name">instance_getsets</tt><tt class="py-op">)</tt> </tt>
<a name="L1507"></a><tt class="py-lineno">1507</tt>  <tt class="py-line">        <tt class="py-name">static_getsets</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt><tt class="py-op">.</tt><tt id="link-476" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-476', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1508"></a><tt class="py-lineno">1508</tt>  <tt class="py-line"> </tt>
<a name="L1509"></a><tt class="py-lineno">1509</tt>  <tt class="py-line">        <tt class="py-comment">## --- register the class type in the module ---</tt> </tt>
<a name="L1510"></a><tt class="py-lineno">1510</tt>  <tt class="py-line">        <tt id="link-477" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-477', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-478" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-478', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"/* Register the '%s' class */"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1511"></a><tt class="py-lineno">1511</tt>  <tt class="py-line"> </tt>
<a name="L1512"></a><tt class="py-lineno">1512</tt>  <tt class="py-line">        <tt class="py-comment">## generate a metaclass if needed</tt> </tt>
<a name="L1513"></a><tt class="py-lineno">1513</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">static_getsets</tt> <tt class="py-op">==</tt> <tt class="py-string">'0'</tt><tt class="py-op">:</tt> </tt>
<a name="L1514"></a><tt class="py-lineno">1514</tt>  <tt class="py-line">            <tt class="py-name">metaclass</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1515"></a><tt class="py-lineno">1515</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1516"></a><tt class="py-lineno">1516</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1517"></a><tt class="py-lineno">1517</tt>  <tt class="py-line">                <tt class="py-name">parent_typestruct</tt> <tt class="py-op">=</tt> <tt class="py-string">'PyBaseObject_Type'</tt> </tt>
<a name="L1518"></a><tt class="py-lineno">1518</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1519"></a><tt class="py-lineno">1519</tt>  <tt class="py-line">                <tt class="py-name">parent_typestruct</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt> </tt>
<a name="L1520"></a><tt class="py-lineno">1520</tt>  <tt class="py-line">            <tt class="py-name">metaclass</tt> <tt class="py-op">=</tt> <tt id="link-479" class="py-name"><a title="pybindgen.cppattribute.PyMetaclass" class="py-name" href="#" onclick="return doclink('link-479', 'PyMetaclass', 'link-21');">PyMetaclass</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">metaclass_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1521"></a><tt class="py-lineno">1521</tt>  <tt class="py-line">                                    <tt class="py-string">"%s.ob_type"</tt> <tt class="py-op">%</tt> <tt class="py-name">parent_typestruct</tt><tt class="py-op">,</tt> </tt>
<a name="L1522"></a><tt class="py-lineno">1522</tt>  <tt class="py-line">                                    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">static_attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L1523"></a><tt class="py-lineno">1523</tt>  <tt class="py-line">            <tt class="py-name">metaclass</tt><tt class="py-op">.</tt><tt id="link-480" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-480', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt id="link-481" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-481', 'module', 'link-237');">module</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1524"></a><tt class="py-lineno">1524</tt>  <tt class="py-line"> </tt>
<a name="L1525"></a><tt class="py-lineno">1525</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1526"></a><tt class="py-lineno">1526</tt>  <tt class="py-line">            <tt class="py-keyword">assert</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">,</tt> <tt id="link-482" class="py-name"><a title="pybindgen.cppclass.CppClass" class="py-name" href="#" onclick="return doclink('link-482', 'CppClass', 'link-28');">CppClass</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1527"></a><tt class="py-lineno">1527</tt>  <tt class="py-line">            <tt id="link-483" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-483', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-484" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-484', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s.tp_base = &amp;%s;'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1528"></a><tt class="py-lineno">1528</tt>  <tt class="py-line">                                         <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">parent</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1529"></a><tt class="py-lineno">1529</tt>  <tt class="py-line"> </tt>
<a name="L1530"></a><tt class="py-lineno">1530</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">metaclass</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1531"></a><tt class="py-lineno">1531</tt>  <tt class="py-line">            <tt id="link-485" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-485', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-486" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-486', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'%s.ob_type = &amp;%s;'</tt> <tt class="py-op">%</tt> </tt>
<a name="L1532"></a><tt class="py-lineno">1532</tt>  <tt class="py-line">                                         <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">,</tt> <tt class="py-name">metaclass</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1533"></a><tt class="py-lineno">1533</tt>  <tt class="py-line"> </tt>
<a name="L1534"></a><tt class="py-lineno">1534</tt>  <tt class="py-line">        <tt id="link-487" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-487', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-488" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_error_check()=pybindgen.typehandlers.base.CodeBlock-class.html#write_error_check"><a title="pybindgen.typehandlers.base.CodeBlock.write_error_check" class="py-name" href="#" onclick="return doclink('link-488', 'write_error_check', 'link-488');">write_error_check</a></tt><tt class="py-op">(</tt><tt class="py-string">'PyType_Ready(&amp;%s)'</tt> </tt>
<a name="L1535"></a><tt class="py-lineno">1535</tt>  <tt class="py-line">                                          <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1536"></a><tt class="py-lineno">1536</tt>  <tt class="py-line"> </tt>
<a name="L1537"></a><tt class="py-lineno">1537</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">template_parameters</tt><tt class="py-op">:</tt> </tt>
<a name="L1538"></a><tt class="py-lineno">1538</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_template_class_name</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1539"></a><tt class="py-lineno">1539</tt>  <tt class="py-line">                <tt class="py-name">class_python_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt> </tt>
<a name="L1540"></a><tt class="py-lineno">1540</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1541"></a><tt class="py-lineno">1541</tt>  <tt class="py-line">                <tt class="py-name">class_python_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">custom_template_class_name</tt> </tt>
<a name="L1542"></a><tt class="py-lineno">1542</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1543"></a><tt class="py-lineno">1543</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-489" class="py-name"><a title="pybindgen.container.Container.python_name" class="py-name" href="#" onclick="return doclink('link-489', 'python_name', 'link-170');">python_name</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1544"></a><tt class="py-lineno">1544</tt>  <tt class="py-line">                <tt class="py-name">class_python_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-490" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-490', 'name', 'link-66');">name</a></tt> </tt>
<a name="L1545"></a><tt class="py-lineno">1545</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1546"></a><tt class="py-lineno">1546</tt>  <tt class="py-line">                <tt class="py-name">class_python_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-491" class="py-name"><a title="pybindgen.container.Container.python_name" class="py-name" href="#" onclick="return doclink('link-491', 'python_name', 'link-170');">python_name</a></tt> </tt>
<a name="L1547"></a><tt class="py-lineno">1547</tt>  <tt class="py-line"> </tt>
<a name="L1548"></a><tt class="py-lineno">1548</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1549"></a><tt class="py-lineno">1549</tt>  <tt class="py-line">            <tt id="link-492" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-492', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-493" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-493', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1550"></a><tt class="py-lineno">1550</tt>  <tt class="py-line">                <tt class="py-string">'PyModule_AddObject(m, (char *) \"%s\", (PyObject *) &amp;%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L1551"></a><tt class="py-lineno">1551</tt>  <tt class="py-line">                <tt class="py-name">class_python_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1552"></a><tt class="py-lineno">1552</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1553"></a><tt class="py-lineno">1553</tt>  <tt class="py-line">            <tt id="link-494" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-494', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-495" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-495', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L1554"></a><tt class="py-lineno">1554</tt>  <tt class="py-line">                <tt class="py-string">'PyDict_SetItemString((PyObject*) %s.tp_dict, (char *) \"%s\", (PyObject *) &amp;%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L1555"></a><tt class="py-lineno">1555</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">,</tt> <tt class="py-name">class_python_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1556"></a><tt class="py-lineno">1556</tt>  <tt class="py-line"> </tt>
<a name="L1557"></a><tt class="py-lineno">1557</tt>  <tt class="py-line">        <tt class="py-name">have_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_constructor</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1558"></a><tt class="py-lineno">1558</tt>  <tt class="py-line"> </tt>
<a name="L1559"></a><tt class="py-lineno">1559</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_methods</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt class="py-name">parent_caller_methods</tt><tt class="py-op">)</tt> </tt>
<a name="L1560"></a><tt class="py-lineno">1560</tt>  <tt class="py-line"> </tt>
<a name="L1561"></a><tt class="py-lineno">1561</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-496" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-496', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1562"></a><tt class="py-lineno">1562</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_gc_methods</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1563"></a><tt class="py-lineno">1563</tt>  <tt class="py-line"> </tt>
<a name="L1564"></a><tt class="py-lineno">1564</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_destructor</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt class="py-name">have_constructor</tt><tt class="py-op">)</tt> </tt>
<a name="L1565"></a><tt class="py-lineno">1565</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_output_stream_operator</tt><tt class="py-op">:</tt> </tt>
<a name="L1566"></a><tt class="py-lineno">1566</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_str</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1567"></a><tt class="py-lineno">1567</tt>  <tt class="py-line">         </tt>
<a name="L1568"></a><tt class="py-lineno">1568</tt>  <tt class="py-line">        <tt class="py-comment">#self._generate_tp_hash(code_sink)</tt> </tt>
<a name="L1569"></a><tt class="py-lineno">1569</tt>  <tt class="py-line">        <tt class="py-comment">#self._generate_tp_compare(code_sink)</tt> </tt>
<a name="L1570"></a><tt class="py-lineno">1570</tt>  <tt class="py-line"> </tt>
<a name="L1571"></a><tt class="py-lineno">1571</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-string">"tp_richcompare"</tt><tt class="py-op">,</tt> <tt class="py-string">"NULL"</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">"NULL"</tt><tt class="py-op">:</tt> </tt>
<a name="L1572"></a><tt class="py-lineno">1572</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">"tp_richcompare"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_tp_richcompare</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1573"></a><tt class="py-lineno">1573</tt>  <tt class="py-line"> </tt>
<a name="L1574"></a><tt class="py-lineno">1574</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">:</tt> </tt>
<a name="L1575"></a><tt class="py-lineno">1575</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">"tp_as_number"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_number_methods</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1576"></a><tt class="py-lineno">1576</tt>  <tt class="py-line"> </tt>
<a name="L1577"></a><tt class="py-lineno">1577</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-497" class="py-name" targets="Method pybindgen.cppclass.CppClass.have_sequence_methods()=pybindgen.cppclass.CppClass-class.html#have_sequence_methods"><a title="pybindgen.cppclass.CppClass.have_sequence_methods" class="py-name" href="#" onclick="return doclink('link-497', 'have_sequence_methods', 'link-497');">have_sequence_methods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1578"></a><tt class="py-lineno">1578</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">"tp_as_sequence"</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_sequence_methods</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1579"></a><tt class="py-lineno">1579</tt>  <tt class="py-line"> </tt>
<a name="L1580"></a><tt class="py-lineno">1580</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_type_structure</tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">docstring</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1581"></a><tt class="py-lineno">1581</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_number_methods"></a><div id="CppClass._generate_number_methods-def"><a name="L1582"></a><tt class="py-lineno">1582</tt> <a class="py-toggle" href="#" id="CppClass._generate_number_methods-toggle" onclick="return toggle('CppClass._generate_number_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_number_methods">_generate_number_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_number_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_number_methods-expanded"><a name="L1583"></a><tt class="py-lineno">1583</tt>  <tt class="py-line">        <tt class="py-name">number_methods_var_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__py_number_methods"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1584"></a><tt class="py-lineno">1584</tt>  <tt class="py-line"> </tt>
<a name="L1585"></a><tt class="py-lineno">1585</tt>  <tt class="py-line">        <tt class="py-name">pynumbermethods</tt> <tt class="py-op">=</tt> <tt id="link-498" class="py-name"><a title="pybindgen.pytypeobject.PyNumberMethods" class="py-name" href="#" onclick="return doclink('link-498', 'PyNumberMethods', 'link-24');">PyNumberMethods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1586"></a><tt class="py-lineno">1586</tt>  <tt class="py-line">        <tt class="py-name">pynumbermethods</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">'variable'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">number_methods_var_name</tt> </tt>
<a name="L1587"></a><tt class="py-lineno">1587</tt>  <tt class="py-line"> </tt>
<a name="L1588"></a><tt class="py-lineno">1588</tt>  <tt class="py-line">        <tt class="py-comment"># iterate over all types and request generation of the</tt> </tt>
<a name="L1589"></a><tt class="py-lineno">1589</tt>  <tt class="py-line">        <tt class="py-comment"># convertion functions for that type (so that those functions</tt> </tt>
<a name="L1590"></a><tt class="py-lineno">1590</tt>  <tt class="py-line">        <tt class="py-comment"># are not generated in the middle of one of the wrappers we</tt> </tt>
<a name="L1591"></a><tt class="py-lineno">1591</tt>  <tt class="py-line">        <tt class="py-comment"># are about to generate)</tt> </tt>
<a name="L1592"></a><tt class="py-lineno">1592</tt>  <tt class="py-line">        <tt class="py-name">root_module</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-499" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-499', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-500" class="py-name" targets="Method pybindgen.module.ModuleBase.get_root()=pybindgen.module.ModuleBase-class.html#get_root"><a title="pybindgen.module.ModuleBase.get_root" class="py-name" href="#" onclick="return doclink('link-500', 'get_root', 'link-500');">get_root</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1593"></a><tt class="py-lineno">1593</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dummy_op_symbol</tt><tt class="py-op">,</tt> <tt class="py-name">op_types</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1594"></a><tt class="py-lineno">1594</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-501" class="py-name" targets="Function pybindgen.utils.retval()=pybindgen.utils-module.html#retval"><a title="pybindgen.utils.retval" class="py-name" href="#" onclick="return doclink('link-501', 'retval', 'link-501');">retval</a></tt><tt class="py-op">,</tt> <tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">right</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">op_types</tt><tt class="py-op">:</tt> </tt>
<a name="L1595"></a><tt class="py-lineno">1595</tt>  <tt class="py-line">                <tt id="link-502" class="py-name" targets="Function pybindgen.cppclass.get_c_to_python_converter()=pybindgen.cppclass-module.html#get_c_to_python_converter"><a title="pybindgen.cppclass.get_c_to_python_converter" class="py-name" href="#" onclick="return doclink('link-502', 'get_c_to_python_converter', 'link-502');">get_c_to_python_converter</a></tt><tt class="py-op">(</tt><tt id="link-503" class="py-name"><a title="pybindgen.utils.retval" class="py-name" href="#" onclick="return doclink('link-503', 'retval', 'link-501');">retval</a></tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1596"></a><tt class="py-lineno">1596</tt>  <tt class="py-line">                <tt id="link-504" class="py-name" targets="Function pybindgen.cppclass.get_python_to_c_converter()=pybindgen.cppclass-module.html#get_python_to_c_converter"><a title="pybindgen.cppclass.get_python_to_c_converter" class="py-name" href="#" onclick="return doclink('link-504', 'get_python_to_c_converter', 'link-504');">get_python_to_c_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1597"></a><tt class="py-lineno">1597</tt>  <tt class="py-line">                <tt id="link-505" class="py-name"><a title="pybindgen.cppclass.get_python_to_c_converter" class="py-name" href="#" onclick="return doclink('link-505', 'get_python_to_c_converter', 'link-504');">get_python_to_c_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">right</tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1598"></a><tt class="py-lineno">1598</tt>  <tt class="py-line"> </tt>
<a name="L1599"></a><tt class="py-lineno">1599</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dummy_op_symbol</tt><tt class="py-op">,</tt> <tt class="py-name">op_types</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1600"></a><tt class="py-lineno">1600</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-506" class="py-name"><a title="pybindgen.utils.retval" class="py-name" href="#" onclick="return doclink('link-506', 'retval', 'link-501');">retval</a></tt><tt class="py-op">,</tt> <tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">right</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">op_types</tt><tt class="py-op">:</tt> </tt>
<a name="L1601"></a><tt class="py-lineno">1601</tt>  <tt class="py-line">                <tt id="link-507" class="py-name"><a title="pybindgen.cppclass.get_python_to_c_converter" class="py-name" href="#" onclick="return doclink('link-507', 'get_python_to_c_converter', 'link-504');">get_python_to_c_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">right</tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1602"></a><tt class="py-lineno">1602</tt>  <tt class="py-line"> </tt>
<a name="L1603"></a><tt class="py-lineno">1603</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-param">op_symbol</tt><tt class="py-op">,</tt> <tt class="py-param">slot_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1604"></a><tt class="py-lineno">1604</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">op_symbol</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">:</tt> </tt>
<a name="L1605"></a><tt class="py-lineno">1605</tt>  <tt class="py-line">                <tt class="py-name">op_types</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">op_symbol</tt><tt class="py-op">]</tt> </tt>
<a name="L1606"></a><tt class="py-lineno">1606</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-name">op_symbol</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">:</tt> </tt>
<a name="L1607"></a><tt class="py-lineno">1607</tt>  <tt class="py-line">                <tt class="py-name">op_types</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">inplace_numeric_operators</tt><tt class="py-op">[</tt><tt class="py-name">op_symbol</tt><tt class="py-op">]</tt> </tt>
<a name="L1608"></a><tt class="py-lineno">1608</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1609"></a><tt class="py-lineno">1609</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
<a name="L1610"></a><tt class="py-lineno">1610</tt>  <tt class="py-line"> </tt>
<a name="L1611"></a><tt class="py-lineno">1611</tt>  <tt class="py-line">            <tt class="py-name">wrapper_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">,</tt> <tt class="py-name">slot_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1612"></a><tt class="py-lineno">1612</tt>  <tt class="py-line">            <tt class="py-name">pynumbermethods</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-name">slot_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">wrapper_name</tt> </tt>
<a name="L1613"></a><tt class="py-lineno">1613</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-508" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-508', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-string">"static PyObject*\n"</tt> </tt>
<a name="L1614"></a><tt class="py-lineno">1614</tt>  <tt class="py-line">                               <tt class="py-string">"%s (PyObject *py_left, PyObject *py_right)\n"</tt> </tt>
<a name="L1615"></a><tt class="py-lineno">1615</tt>  <tt class="py-line">                               <tt class="py-string">"{"</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">wrapper_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1616"></a><tt class="py-lineno">1616</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-509" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-509', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1617"></a><tt class="py-lineno">1617</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt id="link-510" class="py-name"><a title="pybindgen.utils.retval" class="py-name" href="#" onclick="return doclink('link-510', 'retval', 'link-501');">retval</a></tt><tt class="py-op">,</tt> <tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">right</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">op_types</tt><tt class="py-op">:</tt> </tt>
<a name="L1618"></a><tt class="py-lineno">1618</tt>  <tt class="py-line">                <tt class="py-name">retval_converter</tt><tt class="py-op">,</tt> <tt class="py-name">retval_name</tt> <tt class="py-op">=</tt> <tt id="link-511" class="py-name"><a title="pybindgen.cppclass.get_c_to_python_converter" class="py-name" href="#" onclick="return doclink('link-511', 'get_c_to_python_converter', 'link-502');">get_c_to_python_converter</a></tt><tt class="py-op">(</tt><tt id="link-512" class="py-name"><a title="pybindgen.utils.retval" class="py-name" href="#" onclick="return doclink('link-512', 'retval', 'link-501');">retval</a></tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1619"></a><tt class="py-lineno">1619</tt>  <tt class="py-line">                <tt class="py-name">left_converter</tt><tt class="py-op">,</tt> <tt class="py-name">left_name</tt> <tt class="py-op">=</tt> <tt id="link-513" class="py-name"><a title="pybindgen.cppclass.get_python_to_c_converter" class="py-name" href="#" onclick="return doclink('link-513', 'get_python_to_c_converter', 'link-504');">get_python_to_c_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">left</tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1620"></a><tt class="py-lineno">1620</tt>  <tt class="py-line">                <tt class="py-name">right_converter</tt><tt class="py-op">,</tt> <tt class="py-name">right_name</tt> <tt class="py-op">=</tt> <tt id="link-514" class="py-name"><a title="pybindgen.cppclass.get_python_to_c_converter" class="py-name" href="#" onclick="return doclink('link-514', 'get_python_to_c_converter', 'link-504');">get_python_to_c_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">right</tt><tt class="py-op">,</tt> <tt class="py-name">root_module</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1621"></a><tt class="py-lineno">1621</tt>  <tt class="py-line"> </tt>
<a name="L1622"></a><tt class="py-lineno">1622</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-515" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-515', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"{"</tt><tt class="py-op">)</tt> </tt>
<a name="L1623"></a><tt class="py-lineno">1623</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-516" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-516', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1624"></a><tt class="py-lineno">1624</tt>  <tt class="py-line">                 </tt>
<a name="L1625"></a><tt class="py-lineno">1625</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-517" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-517', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s left;"</tt> <tt class="py-op">%</tt> <tt class="py-name">left_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1626"></a><tt class="py-lineno">1626</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-518" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-518', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s right;"</tt> <tt class="py-op">%</tt> <tt class="py-name">right_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1627"></a><tt class="py-lineno">1627</tt>  <tt class="py-line">                 </tt>
<a name="L1628"></a><tt class="py-lineno">1628</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-519" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-519', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"if (%s(py_left, &amp;left) &amp;&amp; %s(py_right, &amp;right)) {"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">left_converter</tt><tt class="py-op">,</tt> <tt class="py-name">right_converter</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1629"></a><tt class="py-lineno">1629</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-520" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-520', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1630"></a><tt class="py-lineno">1630</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-521" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-521', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s result = (left %s right);"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">retval_name</tt><tt class="py-op">,</tt> <tt class="py-name">op_symbol</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1631"></a><tt class="py-lineno">1631</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-522" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-522', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"return %s(&amp;result);"</tt> <tt class="py-op">%</tt> <tt class="py-name">retval_converter</tt><tt class="py-op">)</tt> </tt>
<a name="L1632"></a><tt class="py-lineno">1632</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-523" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-523', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1633"></a><tt class="py-lineno">1633</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-524" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-524', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
<a name="L1634"></a><tt class="py-lineno">1634</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-525" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-525', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"PyErr_Clear();"</tt><tt class="py-op">)</tt> </tt>
<a name="L1635"></a><tt class="py-lineno">1635</tt>  <tt class="py-line"> </tt>
<a name="L1636"></a><tt class="py-lineno">1636</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-526" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-526', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1637"></a><tt class="py-lineno">1637</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-527" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-527', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
<a name="L1638"></a><tt class="py-lineno">1638</tt>  <tt class="py-line">                 </tt>
<a name="L1639"></a><tt class="py-lineno">1639</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-528" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-528', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_INCREF(Py_NotImplemented);"</tt><tt class="py-op">)</tt> </tt>
<a name="L1640"></a><tt class="py-lineno">1640</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-529" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-529', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"return Py_NotImplemented;"</tt><tt class="py-op">)</tt> </tt>
<a name="L1641"></a><tt class="py-lineno">1641</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-530" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-530', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1642"></a><tt class="py-lineno">1642</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-531" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-531', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1643"></a><tt class="py-lineno">1643</tt>  <tt class="py-line"> </tt>
<a name="L1644"></a><tt class="py-lineno">1644</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'+'</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_add'</tt><tt class="py-op">)</tt> </tt>
<a name="L1645"></a><tt class="py-lineno">1645</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_subtract'</tt><tt class="py-op">)</tt> </tt>
<a name="L1646"></a><tt class="py-lineno">1646</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'*'</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_multiply'</tt><tt class="py-op">)</tt> </tt>
<a name="L1647"></a><tt class="py-lineno">1647</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_divide'</tt><tt class="py-op">)</tt> </tt>
<a name="L1648"></a><tt class="py-lineno">1648</tt>  <tt class="py-line">         </tt>
<a name="L1649"></a><tt class="py-lineno">1649</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'+='</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_inplace_add'</tt><tt class="py-op">)</tt> </tt>
<a name="L1650"></a><tt class="py-lineno">1650</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'-='</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_inplace_subtract'</tt><tt class="py-op">)</tt> </tt>
<a name="L1651"></a><tt class="py-lineno">1651</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'*='</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_inplace_multiply'</tt><tt class="py-op">)</tt> </tt>
<a name="L1652"></a><tt class="py-lineno">1652</tt>  <tt class="py-line">        <tt class="py-name">try_wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'/='</tt><tt class="py-op">,</tt> <tt class="py-string">'nb_inplace_divide'</tt><tt class="py-op">)</tt> </tt>
<a name="L1653"></a><tt class="py-lineno">1653</tt>  <tt class="py-line"> </tt>
<a name="L1654"></a><tt class="py-lineno">1654</tt>  <tt class="py-line">        <tt class="py-name">pynumbermethods</tt><tt class="py-op">.</tt><tt id="link-532" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-532', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1655"></a><tt class="py-lineno">1655</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">number_methods_var_name</tt> </tt>
</div><a name="L1656"></a><tt class="py-lineno">1656</tt>  <tt class="py-line">         </tt>
<a name="CppClass._generate_sequence_methods"></a><div id="CppClass._generate_sequence_methods-def"><a name="L1657"></a><tt class="py-lineno">1657</tt> <a class="py-toggle" href="#" id="CppClass._generate_sequence_methods-toggle" onclick="return toggle('CppClass._generate_sequence_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_sequence_methods">_generate_sequence_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_sequence_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_sequence_methods-expanded"><a name="L1658"></a><tt class="py-lineno">1658</tt>  <tt class="py-line">        <tt class="py-name">sequence_methods_var_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__py_sequence_methods"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1659"></a><tt class="py-lineno">1659</tt>  <tt class="py-line"> </tt>
<a name="L1660"></a><tt class="py-lineno">1660</tt>  <tt class="py-line">        <tt class="py-name">pysequencemethods</tt> <tt class="py-op">=</tt> <tt id="link-533" class="py-name"><a title="pybindgen.pytypeobject.PySequenceMethods" class="py-name" href="#" onclick="return doclink('link-533', 'PySequenceMethods', 'link-25');">PySequenceMethods</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1661"></a><tt class="py-lineno">1661</tt>  <tt class="py-line">        <tt class="py-name">pysequencemethods</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">'variable'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">sequence_methods_var_name</tt> </tt>
<a name="L1662"></a><tt class="py-lineno">1662</tt>  <tt class="py-line"> </tt>
<a name="L1663"></a><tt class="py-lineno">1663</tt>  <tt class="py-line">        <tt class="py-name">root_module</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-534" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-534', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt id="link-535" class="py-name"><a title="pybindgen.module.ModuleBase.get_root" class="py-name" href="#" onclick="return doclink('link-535', 'get_root', 'link-500');">get_root</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1664"></a><tt class="py-lineno">1664</tt>  <tt class="py-line">        <tt class="py-name">self_converter</tt> <tt class="py-op">=</tt> <tt class="py-name">root_module</tt><tt class="py-op">.</tt><tt id="link-536" class="py-name"><a title="pybindgen.module.Module.generate_python_to_c_type_converter" class="py-name" href="#" onclick="return doclink('link-536', 'generate_python_to_c_type_converter', 'link-29');">generate_python_to_c_type_converter</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ThisClassReturn</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1665"></a><tt class="py-lineno">1665</tt>  <tt class="py-line"> </tt>
<a name="L1666"></a><tt class="py-lineno">1666</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">try_wrap_sequence_method</tt><tt class="py-op">(</tt><tt class="py-param">py_name</tt><tt class="py-op">,</tt> <tt class="py-param">slot_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1667"></a><tt class="py-lineno">1667</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">py_name</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1668"></a><tt class="py-lineno">1668</tt>  <tt class="py-line">                <tt class="py-keyword">assert</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt class="py-name">py_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">wrappers</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt> </tt>
<a name="L1669"></a><tt class="py-lineno">1669</tt>  <tt class="py-line">                <tt class="py-name">meth</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt class="py-name">py_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">wrappers</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L1670"></a><tt class="py-lineno">1670</tt>  <tt class="py-line">                <tt class="py-name">wrapper_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_full_name</tt><tt class="py-op">,</tt> <tt class="py-name">slot_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1671"></a><tt class="py-lineno">1671</tt>  <tt class="py-line">                <tt class="py-name">pysequencemethods</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-name">slot_name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">wrapper_name</tt> </tt>
<a name="L1672"></a><tt class="py-lineno">1672</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-537" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-537', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">pysequencemethods</tt><tt class="py-op">.</tt><tt id="link-538" class="py-name" targets="Variable pybindgen.pytypeobject.PySequenceMethods.FUNCTION_TEMPLATES=pybindgen.pytypeobject.PySequenceMethods-class.html#FUNCTION_TEMPLATES"><a title="pybindgen.pytypeobject.PySequenceMethods.FUNCTION_TEMPLATES" class="py-name" href="#" onclick="return doclink('link-538', 'FUNCTION_TEMPLATES', 'link-538');">FUNCTION_TEMPLATES</a></tt><tt class="py-op">[</tt><tt class="py-name">slot_name</tt><tt class="py-op">]</tt> <tt class="py-op">%</tt> <tt class="py-op">{</tt><tt class="py-string">'wrapper_name'</tt>   <tt class="py-op">:</tt> <tt class="py-name">wrapper_name</tt><tt class="py-op">,</tt> </tt>
<a name="L1673"></a><tt class="py-lineno">1673</tt>  <tt class="py-line">                                                                                     <tt class="py-string">'py_struct'</tt>      <tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pystruct</tt><tt class="py-op">,</tt> </tt>
<a name="L1674"></a><tt class="py-lineno">1674</tt>  <tt class="py-line">                                                                                     <tt class="py-string">'method_name'</tt>    <tt class="py-op">:</tt> <tt class="py-name">meth</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L1675"></a><tt class="py-lineno">1675</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
</div><a name="L1676"></a><tt class="py-lineno">1676</tt>  <tt class="py-line"> </tt>
<a name="L1677"></a><tt class="py-lineno">1677</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-op">(</tt><tt class="py-name">py_name</tt><tt class="py-op">,</tt> <tt class="py-name">slot_name</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-op">(</tt><tt class="py-string">"__len__"</tt><tt class="py-op">,</tt> <tt class="py-string">"sq_length"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1678"></a><tt class="py-lineno">1678</tt>  <tt class="py-line">                                     <tt class="py-op">(</tt><tt class="py-string">"__getitem__"</tt><tt class="py-op">,</tt> <tt class="py-string">"sq_item"</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
<a name="L1679"></a><tt class="py-lineno">1679</tt>  <tt class="py-line">                                     <tt class="py-op">(</tt><tt class="py-string">"__setitem__"</tt><tt class="py-op">,</tt> <tt class="py-string">"sq_ass_item"</tt><tt class="py-op">)</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
<a name="L1680"></a><tt class="py-lineno">1680</tt>  <tt class="py-line">            <tt class="py-name">try_wrap_sequence_method</tt><tt class="py-op">(</tt><tt class="py-name">py_name</tt><tt class="py-op">,</tt> <tt class="py-name">slot_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1681"></a><tt class="py-lineno">1681</tt>  <tt class="py-line">             </tt>
<a name="L1682"></a><tt class="py-lineno">1682</tt>  <tt class="py-line"> </tt>
<a name="L1683"></a><tt class="py-lineno">1683</tt>  <tt class="py-line">        <tt class="py-name">pysequencemethods</tt><tt class="py-op">.</tt><tt id="link-539" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-539', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1684"></a><tt class="py-lineno">1684</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">'&amp;'</tt> <tt class="py-op">+</tt> <tt class="py-name">sequence_methods_var_name</tt> </tt>
</div><a name="L1685"></a><tt class="py-lineno">1685</tt>  <tt class="py-line">         </tt>
<a name="CppClass.have_sequence_methods"></a><div id="CppClass.have_sequence_methods-def"><a name="L1686"></a><tt class="py-lineno">1686</tt> <a class="py-toggle" href="#" id="CppClass.have_sequence_methods-toggle" onclick="return toggle('CppClass.have_sequence_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#have_sequence_methods">have_sequence_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.have_sequence_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.have_sequence_methods-expanded"><a name="L1687"></a><tt class="py-lineno">1687</tt>  <tt class="py-line">        <tt class="py-docstring">"""Determine if this object has sequence methods registered."""</tt> </tt>
<a name="L1688"></a><tt class="py-lineno">1688</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">valid_sequence_methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1689"></a><tt class="py-lineno">1689</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">:</tt> </tt>
<a name="L1690"></a><tt class="py-lineno">1690</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L1691"></a><tt class="py-lineno">1691</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
</div><a name="L1692"></a><tt class="py-lineno">1692</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_type_structure"></a><div id="CppClass._generate_type_structure-def"><a name="L1693"></a><tt class="py-lineno">1693</tt> <a class="py-toggle" href="#" id="CppClass._generate_type_structure-toggle" onclick="return toggle('CppClass._generate_type_structure');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_type_structure">_generate_type_structure</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">docstring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_type_structure-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_type_structure-expanded"><a name="L1694"></a><tt class="py-lineno">1694</tt>  <tt class="py-line">        <tt class="py-docstring">"""generate the type structure"""</tt> </tt>
<a name="L1695"></a><tt class="py-lineno">1695</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_basicsize"</tt><tt class="py-op">,</tt> </tt>
<a name="L1696"></a><tt class="py-lineno">1696</tt>  <tt class="py-line">                              <tt class="py-string">"sizeof(%s)"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-540" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-540', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1697"></a><tt class="py-lineno">1697</tt>  <tt class="py-line">        <tt class="py-name">tp_flags</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'Py_TPFLAGS_DEFAULT'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1698"></a><tt class="py-lineno">1698</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-541" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-541', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1699"></a><tt class="py-lineno">1699</tt>  <tt class="py-line">            <tt class="py-name">tp_flags</tt><tt class="py-op">.</tt><tt id="link-542" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-542', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_TPFLAGS_HAVE_GC"</tt><tt class="py-op">)</tt> </tt>
<a name="L1700"></a><tt class="py-lineno">1700</tt>  <tt class="py-line">            <tt class="py-name">tp_flags</tt><tt class="py-op">.</tt><tt id="link-543" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-543', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_TPFLAGS_BASETYPE"</tt><tt class="py-op">)</tt> </tt>
<a name="L1701"></a><tt class="py-lineno">1701</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_dictoffset"</tt><tt class="py-op">,</tt> </tt>
<a name="L1702"></a><tt class="py-lineno">1702</tt>  <tt class="py-line">                                  <tt class="py-string">"offsetof(%s, inst_dict)"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-544" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-544', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt> </tt>
<a name="L1703"></a><tt class="py-lineno">1703</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1704"></a><tt class="py-lineno">1704</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_dictoffset"</tt><tt class="py-op">,</tt> <tt class="py-string">"0"</tt><tt class="py-op">)</tt> </tt>
<a name="L1705"></a><tt class="py-lineno">1705</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_numeric_operators</tt><tt class="py-op">:</tt> </tt>
<a name="L1706"></a><tt class="py-lineno">1706</tt>  <tt class="py-line">            <tt class="py-name">tp_flags</tt><tt class="py-op">.</tt><tt id="link-545" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-545', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_TPFLAGS_CHECKTYPES"</tt><tt class="py-op">)</tt>             </tt>
<a name="L1707"></a><tt class="py-lineno">1707</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_flags"</tt><tt class="py-op">,</tt> <tt class="py-string">'|'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">tp_flags</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1708"></a><tt class="py-lineno">1708</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_doc"</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">docstring</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'NULL'</tt> </tt>
<a name="L1709"></a><tt class="py-lineno">1709</tt>  <tt class="py-line">                                         <tt class="py-keyword">or</tt> <tt class="py-string">"\"%s\""</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">docstring</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1710"></a><tt class="py-lineno">1710</tt>  <tt class="py-line">        <tt class="py-name">dict_</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt> </tt>
<a name="L1711"></a><tt class="py-lineno">1711</tt>  <tt class="py-line">        <tt class="py-name">dict_</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"typestruct"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt> </tt>
<a name="L1712"></a><tt class="py-lineno">1712</tt>  <tt class="py-line"> </tt>
<a name="L1713"></a><tt class="py-lineno">1713</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1714"></a><tt class="py-lineno">1714</tt>  <tt class="py-line">            <tt class="py-name">mod_path</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_module</tt><tt class="py-op">.</tt><tt id="link-546" class="py-name" targets="Method pybindgen.module.ModuleBase.get_module_path()=pybindgen.module.ModuleBase-class.html#get_module_path"><a title="pybindgen.module.ModuleBase.get_module_path" class="py-name" href="#" onclick="return doclink('link-546', 'get_module_path', 'link-546');">get_module_path</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1715"></a><tt class="py-lineno">1715</tt>  <tt class="py-line">            <tt class="py-name">mod_path</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mangled_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1716"></a><tt class="py-lineno">1716</tt>  <tt class="py-line">            <tt class="py-name">dict_</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_name"</tt><tt class="py-op">,</tt> <tt class="py-string">'.'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">mod_path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1717"></a><tt class="py-lineno">1717</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1718"></a><tt class="py-lineno">1718</tt>  <tt class="py-line">            <tt class="py-name">dict_</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_name"</tt><tt class="py-op">,</tt> <tt class="py-string">'%s.%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outer_class</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">'tp_name'</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-547" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-547', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1719"></a><tt class="py-lineno">1719</tt>  <tt class="py-line"> </tt>
<a name="L1720"></a><tt class="py-lineno">1720</tt>  <tt class="py-line">        <tt class="py-comment">## tp_call support</tt> </tt>
<a name="L1721"></a><tt class="py-lineno">1721</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1722"></a><tt class="py-lineno">1722</tt>  <tt class="py-line">            <tt class="py-name">call_method</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">[</tt><tt class="py-string">'__call__'</tt><tt class="py-op">]</tt> </tt>
<a name="L1723"></a><tt class="py-lineno">1723</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
<a name="L1724"></a><tt class="py-lineno">1724</tt>  <tt class="py-line">            <tt class="py-keyword">pass</tt> </tt>
<a name="L1725"></a><tt class="py-lineno">1725</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1726"></a><tt class="py-lineno">1726</tt>  <tt class="py-line">            <tt class="py-name">dict_</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_call"</tt><tt class="py-op">,</tt> <tt class="py-name">call_method</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1727"></a><tt class="py-lineno">1727</tt>  <tt class="py-line"> </tt>
<a name="L1728"></a><tt class="py-lineno">1728</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytype</tt><tt class="py-op">.</tt><tt id="link-548" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-548', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1729"></a><tt class="py-lineno">1729</tt>  <tt class="py-line"> </tt>
<a name="L1730"></a><tt class="py-lineno">1730</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_constructor"></a><div id="CppClass._generate_constructor-def"><a name="L1731"></a><tt class="py-lineno">1731</tt> <a class="py-toggle" href="#" id="CppClass._generate_constructor-toggle" onclick="return toggle('CppClass._generate_constructor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_constructor">_generate_constructor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_constructor-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_constructor-expanded"><a name="L1732"></a><tt class="py-lineno">1732</tt>  <tt class="py-line">        <tt class="py-docstring">"""generate the constructor, if any"""</tt> </tt>
<a name="L1733"></a><tt class="py-lineno">1733</tt>  <tt class="py-line">        <tt class="py-name">have_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L1734"></a><tt class="py-lineno">1734</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-549" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-549', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
<a name="L1735"></a><tt class="py-lineno">1735</tt>  <tt class="py-line">                                  <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-550" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-550', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1736"></a><tt class="py-lineno">1736</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-551" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-551', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1737"></a><tt class="py-lineno">1737</tt>  <tt class="py-line">            <tt class="py-name">overload</tt> <tt class="py-op">=</tt> <tt id="link-552" class="py-name" targets="Class pybindgen.cppmethod.CppOverloadedConstructor=pybindgen.cppmethod.CppOverloadedConstructor-class.html"><a title="pybindgen.cppmethod.CppOverloadedConstructor" class="py-name" href="#" onclick="return doclink('link-552', 'CppOverloadedConstructor', 'link-552');">CppOverloadedConstructor</a></tt><tt class="py-op">(</tt><tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L1738"></a><tt class="py-lineno">1738</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructors_overload</tt> <tt class="py-op">=</tt> <tt class="py-name">overload</tt> </tt>
<a name="L1739"></a><tt class="py-lineno">1739</tt>  <tt class="py-line">            <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-553" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-553', 'pystruct', 'link-68');">pystruct</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-554" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-554', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L1740"></a><tt class="py-lineno">1740</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">constructor</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructors</tt><tt class="py-op">:</tt> </tt>
<a name="L1741"></a><tt class="py-lineno">1741</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1742"></a><tt class="py-lineno">1742</tt>  <tt class="py-line">                    <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-555" class="py-name"><a title="pybindgen.overloading.OverloadedWrapper.add" class="py-name" href="#" onclick="return doclink('link-555', 'add', 'link-87');">add</a></tt><tt class="py-op">(</tt><tt class="py-name">constructor</tt><tt class="py-op">)</tt> </tt>
<a name="L1743"></a><tt class="py-lineno">1743</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-556" class="py-name"><a title="pybindgen.typehandlers.base.CodegenErrorBase" class="py-name" href="#" onclick="return doclink('link-556', 'CodegenErrorBase', 'link-8');">CodegenErrorBase</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1744"></a><tt class="py-lineno">1744</tt>  <tt class="py-line">                    <tt class="py-keyword">continue</tt> </tt>
<a name="L1745"></a><tt class="py-lineno">1745</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">wrappers</tt><tt class="py-op">:</tt> </tt>
<a name="L1746"></a><tt class="py-lineno">1746</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1747"></a><tt class="py-lineno">1747</tt>  <tt class="py-line">                    <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-557" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-557', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1748"></a><tt class="py-lineno">1748</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt id="link-558" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-558', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-559" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-559', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1749"></a><tt class="py-lineno">1749</tt>  <tt class="py-line">                    <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1750"></a><tt class="py-lineno">1750</tt>  <tt class="py-line">                    <tt class="py-name">have_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1751"></a><tt class="py-lineno">1751</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1752"></a><tt class="py-lineno">1752</tt>  <tt class="py-line">                    <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">overload</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt> </tt>
<a name="L1753"></a><tt class="py-lineno">1753</tt>  <tt class="py-line">                    <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-560" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-560', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1754"></a><tt class="py-lineno">1754</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1755"></a><tt class="py-lineno">1755</tt>  <tt class="py-line">                <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L1756"></a><tt class="py-lineno">1756</tt>  <tt class="py-line">                <tt class="py-name">have_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1757"></a><tt class="py-lineno">1757</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1758"></a><tt class="py-lineno">1758</tt>  <tt class="py-line">            <tt class="py-comment">## In C++, and unlike Python, constructors with</tt> </tt>
<a name="L1759"></a><tt class="py-lineno">1759</tt>  <tt class="py-line">            <tt class="py-comment">## parameters are not automatically inheritted by</tt> </tt>
<a name="L1760"></a><tt class="py-lineno">1760</tt>  <tt class="py-line">            <tt class="py-comment">## subclasses.  We must generate a 'no constructor'</tt> </tt>
<a name="L1761"></a><tt class="py-lineno">1761</tt>  <tt class="py-line">            <tt class="py-comment">## tp_init to prevent this type from inheriting a</tt> </tt>
<a name="L1762"></a><tt class="py-lineno">1762</tt>  <tt class="py-line">            <tt class="py-comment">## tp_init that will allocate an instance of the</tt> </tt>
<a name="L1763"></a><tt class="py-lineno">1763</tt>  <tt class="py-line">            <tt class="py-comment">## parent class instead of this class.</tt> </tt>
<a name="L1764"></a><tt class="py-lineno">1764</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-561" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-561', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>             </tt>
<a name="L1765"></a><tt class="py-lineno">1765</tt>  <tt class="py-line">            <tt class="py-name">wrapper</tt> <tt class="py-op">=</tt> <tt id="link-562" class="py-name" targets="Class pybindgen.cppmethod.CppNoConstructor=pybindgen.cppmethod.CppNoConstructor-class.html"><a title="pybindgen.cppmethod.CppNoConstructor" class="py-name" href="#" onclick="return doclink('link-562', 'CppNoConstructor', 'link-562');">CppNoConstructor</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cannot_be_constructed</tt><tt class="py-op">)</tt> </tt>
<a name="L1766"></a><tt class="py-lineno">1766</tt>  <tt class="py-line">            <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt id="link-563" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-563', 'generate', 'link-125');">generate</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1767"></a><tt class="py-lineno">1767</tt>  <tt class="py-line">            <tt class="py-name">constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">wrapper</tt><tt class="py-op">.</tt><tt class="py-name">wrapper_actual_name</tt> </tt>
<a name="L1768"></a><tt class="py-lineno">1768</tt>  <tt class="py-line">            <tt class="py-name">have_constructor</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L1769"></a><tt class="py-lineno">1769</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-564" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-564', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1770"></a><tt class="py-lineno">1770</tt>  <tt class="py-line"> </tt>
<a name="L1771"></a><tt class="py-lineno">1771</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_init"</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">constructor</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-string">"NULL"</tt> </tt>
<a name="L1772"></a><tt class="py-lineno">1772</tt>  <tt class="py-line">                                          <tt class="py-keyword">or</tt> <tt class="py-name">constructor</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1773"></a><tt class="py-lineno">1773</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">have_constructor</tt> </tt>
</div><a name="L1774"></a><tt class="py-lineno">1774</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_copy_method"></a><div id="CppClass._generate_copy_method-def"><a name="L1775"></a><tt class="py-lineno">1775</tt> <a class="py-toggle" href="#" id="CppClass._generate_copy_method-toggle" onclick="return toggle('CppClass._generate_copy_method');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method">_generate_copy_method</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_copy_method-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_copy_method-expanded"><a name="L1776"></a><tt class="py-lineno">1776</tt>  <tt class="py-line">        <tt class="py-name">construct_name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-565" class="py-name"><a title="pybindgen.cppclass.CppClass.get_construct_name" class="py-name" href="#" onclick="return doclink('link-565', 'get_construct_name', 'link-253');">get_construct_name</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1777"></a><tt class="py-lineno">1777</tt>  <tt class="py-line">        <tt class="py-name">copy_wrapper_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'_wrap_%s__copy__'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-566" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-566', 'pystruct', 'link-68');">pystruct</a></tt> </tt>
<a name="L1778"></a><tt class="py-lineno">1778</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-567" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-567', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1779"></a><tt class="py-lineno">1779</tt>  <tt class="py-line"><tt class="py-string">static PyObject*\n%s(%s *self)</tt> </tt>
<a name="L1780"></a><tt class="py-lineno">1780</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1781"></a><tt class="py-lineno">1781</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">copy_wrapper_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-568" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-568', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1782"></a><tt class="py-lineno">1782</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-569" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-569', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1783"></a><tt class="py-lineno">1783</tt>  <tt class="py-line"> </tt>
<a name="L1784"></a><tt class="py-lineno">1784</tt>  <tt class="py-line">        <tt class="py-name">declarations</tt> <tt class="py-op">=</tt> <tt id="link-570" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-570', 'DeclarationsScope', 'link-9');">DeclarationsScope</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1785"></a><tt class="py-lineno">1785</tt>  <tt class="py-line">        <tt id="link-571" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-571', 'code_block', 'link-47');">code_block</a></tt> <tt class="py-op">=</tt> <tt id="link-572" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-572', 'CodeBlock', 'link-10');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-string">"return NULL;"</tt><tt class="py-op">,</tt> <tt class="py-name">declarations</tt><tt class="py-op">)</tt> </tt>
<a name="L1786"></a><tt class="py-lineno">1786</tt>  <tt class="py-line"> </tt>
<a name="L1787"></a><tt class="py-lineno">1787</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-573" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-573', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1788"></a><tt class="py-lineno">1788</tt>  <tt class="py-line">            <tt class="py-name">new_func</tt> <tt class="py-op">=</tt> <tt class="py-string">'PyObject_GC_New'</tt> </tt>
<a name="L1789"></a><tt class="py-lineno">1789</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1790"></a><tt class="py-lineno">1790</tt>  <tt class="py-line">            <tt class="py-name">new_func</tt> <tt class="py-op">=</tt> <tt class="py-string">'PyObject_New'</tt> </tt>
<a name="L1791"></a><tt class="py-lineno">1791</tt>  <tt class="py-line"> </tt>
<a name="L1792"></a><tt class="py-lineno">1792</tt>  <tt class="py-line">        <tt class="py-name">py_copy</tt> <tt class="py-op">=</tt> <tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-574" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.declare_variable()=pybindgen.typehandlers.base.CodeBlock-class.html#declare_variable,Method pybindgen.typehandlers.base.DeclarationsScope.declare_variable()=pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable"><a title="pybindgen.typehandlers.base.CodeBlock.declare_variable
pybindgen.typehandlers.base.DeclarationsScope.declare_variable" class="py-name" href="#" onclick="return doclink('link-574', 'declare_variable', 'link-574');">declare_variable</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s*"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-575" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-575', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-string">"py_copy"</tt><tt class="py-op">)</tt> </tt>
<a name="L1793"></a><tt class="py-lineno">1793</tt>  <tt class="py-line">        <tt id="link-576" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-576', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-577" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-577', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s = %s(%s, %s);"</tt> <tt class="py-op">%</tt> </tt>
<a name="L1794"></a><tt class="py-lineno">1794</tt>  <tt class="py-line">                              <tt class="py-op">(</tt><tt class="py-name">py_copy</tt><tt class="py-op">,</tt> <tt class="py-name">new_func</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-578" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-578', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-string">'&amp;'</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1795"></a><tt class="py-lineno">1795</tt>  <tt class="py-line">        <tt id="link-579" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-579', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-580" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-580', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s-&gt;obj = new %s(*self-&gt;obj);"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">py_copy</tt><tt class="py-op">,</tt> <tt class="py-name">construct_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1796"></a><tt class="py-lineno">1796</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-581" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-581', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1797"></a><tt class="py-lineno">1797</tt>  <tt class="py-line">            <tt id="link-582" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-582', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-583" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-583', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s-&gt;inst_dict = NULL;"</tt> <tt class="py-op">%</tt> <tt class="py-name">py_copy</tt><tt class="py-op">)</tt> </tt>
<a name="L1798"></a><tt class="py-lineno">1798</tt>  <tt class="py-line"> </tt>
<a name="L1799"></a><tt class="py-lineno">1799</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-584" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-584', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt><tt class="py-op">.</tt><tt id="link-585" class="py-name" targets="Method pybindgen.wrapper_registry.NullWrapperRegistry.write_register_new_wrapper()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#write_register_new_wrapper,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.write_register_new_wrapper()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#write_register_new_wrapper,Method pybindgen.wrapper_registry.WrapperRegistry.write_register_new_wrapper()=pybindgen.wrapper_registry.WrapperRegistry-class.html#write_register_new_wrapper"><a title="pybindgen.wrapper_registry.NullWrapperRegistry.write_register_new_wrapper
pybindgen.wrapper_registry.StdMapWrapperRegistry.write_register_new_wrapper
pybindgen.wrapper_registry.WrapperRegistry.write_register_new_wrapper" class="py-name" href="#" onclick="return doclink('link-585', 'write_register_new_wrapper', 'link-585');">write_register_new_wrapper</a></tt><tt class="py-op">(</tt><tt id="link-586" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-586', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">,</tt> <tt class="py-name">py_copy</tt><tt class="py-op">,</tt> <tt class="py-string">"%s-&gt;obj"</tt> <tt class="py-op">%</tt> <tt class="py-name">py_copy</tt><tt class="py-op">)</tt> </tt>
<a name="L1800"></a><tt class="py-lineno">1800</tt>  <tt class="py-line"> </tt>
<a name="L1801"></a><tt class="py-lineno">1801</tt>  <tt class="py-line">        <tt id="link-587" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-587', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-588" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-588', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"return (PyObject*) %s;"</tt> <tt class="py-op">%</tt> <tt class="py-name">py_copy</tt><tt class="py-op">)</tt> </tt>
<a name="L1802"></a><tt class="py-lineno">1802</tt>  <tt class="py-line"> </tt>
<a name="L1803"></a><tt class="py-lineno">1803</tt>  <tt class="py-line">        <tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-589" class="py-name" targets="Method pybindgen.typehandlers.base.DeclarationsScope.get_code_sink()=pybindgen.typehandlers.base.DeclarationsScope-class.html#get_code_sink"><a title="pybindgen.typehandlers.base.DeclarationsScope.get_code_sink" class="py-name" href="#" onclick="return doclink('link-589', 'get_code_sink', 'link-589');">get_code_sink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-590" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-590', 'flush_to', 'link-90');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1804"></a><tt class="py-lineno">1804</tt>  <tt class="py-line"> </tt>
<a name="L1805"></a><tt class="py-lineno">1805</tt>  <tt class="py-line">        <tt id="link-591" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-591', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-592" class="py-name" targets="Method pybindgen.typehandlers.base.CodeBlock.write_cleanup()=pybindgen.typehandlers.base.CodeBlock-class.html#write_cleanup"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-592', 'write_cleanup', 'link-592');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1806"></a><tt class="py-lineno">1806</tt>  <tt class="py-line">        <tt id="link-593" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-593', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-594" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-594', 'flush_to', 'link-90');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1807"></a><tt class="py-lineno">1807</tt>  <tt class="py-line"> </tt>
<a name="L1808"></a><tt class="py-lineno">1808</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-595" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-595', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1809"></a><tt class="py-lineno">1809</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-596" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-596', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}"</tt><tt class="py-op">)</tt> </tt>
<a name="L1810"></a><tt class="py-lineno">1810</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-597" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-597', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1811"></a><tt class="py-lineno">1811</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">copy_wrapper_name</tt> </tt>
</div><a name="L1812"></a><tt class="py-lineno">1812</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_methods"></a><div id="CppClass._generate_methods-def"><a name="L1813"></a><tt class="py-lineno">1813</tt> <a class="py-toggle" href="#" id="CppClass._generate_methods-toggle" onclick="return toggle('CppClass._generate_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_methods">_generate_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">parent_caller_methods</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_methods-expanded"><a name="L1814"></a><tt class="py-lineno">1814</tt>  <tt class="py-line">        <tt class="py-docstring">"""generate the method wrappers"""</tt> </tt>
<a name="L1815"></a><tt class="py-lineno">1815</tt>  <tt class="py-line">        <tt class="py-name">method_defs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L1816"></a><tt class="py-lineno">1816</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">meth_name</tt><tt class="py-op">,</tt> <tt class="py-name">overload</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">methods</tt><tt class="py-op">.</tt><tt class="py-name">iteritems</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1817"></a><tt class="py-lineno">1817</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-598" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-598', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1818"></a><tt class="py-lineno">1818</tt>  <tt class="py-line">            <tt class="py-comment">#overload.generate(code_sink)</tt> </tt>
<a name="L1819"></a><tt class="py-lineno">1819</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1820"></a><tt class="py-lineno">1820</tt>  <tt class="py-line">                <tt id="link-599" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-599', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-600" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-600', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-601" class="py-name"><a title="pybindgen.container.Container.generate
pybindgen.container.IterNextWrapper.generate
pybindgen.converter_functions.CToPythonConverter.generate
pybindgen.converter_functions.PythonToCConverter.generate
pybindgen.cppattribute.CppInstanceAttributeGetter.generate
pybindgen.cppattribute.CppInstanceAttributeSetter.generate
pybindgen.cppattribute.CppStaticAttributeGetter.generate
pybindgen.cppattribute.CppStaticAttributeSetter.generate
pybindgen.cppattribute.PyGetSetDef.generate
pybindgen.cppattribute.PyGetter.generate
pybindgen.cppattribute.PyMetaclass.generate
pybindgen.cppattribute.PySetter.generate
pybindgen.cppclass.CppClass.generate
pybindgen.cppclass.CppHelperClass.generate
pybindgen.cppmethod.CppConstructor.generate
pybindgen.cppmethod.CppMethod.generate
pybindgen.cppmethod.CppNoConstructor.generate
pybindgen.cppmethod.CppVirtualMethodProxy.generate
pybindgen.cppmethod.CustomCppConstructorWrapper.generate
pybindgen.cppmethod.CustomCppMethodWrapper.generate
pybindgen.enum.Enum.generate
pybindgen.function.CustomFunctionWrapper.generate
pybindgen.function.Function.generate
pybindgen.module.Module.generate
pybindgen.overloading.OverloadedWrapper.generate
pybindgen.pytypeobject.PyNumberMethods.generate
pybindgen.pytypeobject.PySequenceMethods.generate
pybindgen.pytypeobject.PyTypeObject.generate
pybindgen.typehandlers.base.ReverseWrapperBase.generate
pybindgen.wrapper_registry.NullWrapperRegistry.generate
pybindgen.wrapper_registry.StdMapWrapperRegistry.generate
pybindgen.wrapper_registry.WrapperRegistry.generate" class="py-name" href="#" onclick="return doclink('link-601', 'generate', 'link-125');">generate</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">overload</tt><tt class="py-op">)</tt> </tt>
<a name="L1821"></a><tt class="py-lineno">1821</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-602" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-602', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-603" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-603', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1822"></a><tt class="py-lineno">1822</tt>  <tt class="py-line">                <tt class="py-keyword">continue</tt> </tt>
<a name="L1823"></a><tt class="py-lineno">1823</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">meth_name</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'__call__'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> <tt class="py-comment"># need to be converted to slots</tt> </tt>
<a name="L1824"></a><tt class="py-lineno">1824</tt>  <tt class="py-line">                <tt class="py-name">method_defs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">overload</tt><tt class="py-op">.</tt><tt id="link-604" class="py-name"><a title="pybindgen.cppmethod.CppMethod.get_py_method_def
pybindgen.cppmethod.CppVirtualMethodParentCaller.get_py_method_def
pybindgen.function.Function.get_py_method_def
pybindgen.overloading.OverloadedWrapper.get_py_method_def" class="py-name" href="#" onclick="return doclink('link-604', 'get_py_method_def', 'link-157');">get_py_method_def</a></tt><tt class="py-op">(</tt><tt class="py-name">meth_name</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1825"></a><tt class="py-lineno">1825</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-605" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-605', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1826"></a><tt class="py-lineno">1826</tt>  <tt class="py-line">        <tt class="py-name">method_defs</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">parent_caller_methods</tt><tt class="py-op">)</tt> </tt>
<a name="L1827"></a><tt class="py-lineno">1827</tt>  <tt class="py-line"> </tt>
<a name="L1828"></a><tt class="py-lineno">1828</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">has_copy_constructor</tt><tt class="py-op">:</tt> </tt>
<a name="L1829"></a><tt class="py-lineno">1829</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L1830"></a><tt class="py-lineno">1830</tt>  <tt class="py-line">                <tt class="py-name">copy_wrapper_name</tt> <tt class="py-op">=</tt> <tt id="link-606" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-606', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-607" class="py-name"><a title="pybindgen.utils.call_with_error_handling" class="py-name" href="#" onclick="return doclink('link-607', 'call_with_error_handling', 'link-124');">call_with_error_handling</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_generate_copy_method</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L1831"></a><tt class="py-lineno">1831</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt id="link-608" class="py-name"><a title="pybindgen.utils" class="py-name" href="#" onclick="return doclink('link-608', 'utils', 'link-27');">utils</a></tt><tt class="py-op">.</tt><tt id="link-609" class="py-name"><a title="pybindgen.utils.SkipWrapper" class="py-name" href="#" onclick="return doclink('link-609', 'SkipWrapper', 'link-128');">SkipWrapper</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1832"></a><tt class="py-lineno">1832</tt>  <tt class="py-line">                <tt class="py-keyword">pass</tt> </tt>
<a name="L1833"></a><tt class="py-lineno">1833</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1834"></a><tt class="py-lineno">1834</tt>  <tt class="py-line">                <tt class="py-name">method_defs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'{(char *) "__copy__", (PyCFunction) %s, METH_NOARGS, NULL},'</tt> <tt class="py-op">%</tt> <tt class="py-name">copy_wrapper_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1835"></a><tt class="py-lineno">1835</tt>  <tt class="py-line"> </tt>
<a name="L1836"></a><tt class="py-lineno">1836</tt>  <tt class="py-line">        <tt class="py-comment">## generate the method table</tt> </tt>
<a name="L1837"></a><tt class="py-lineno">1837</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-610" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-610', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"static PyMethodDef %s_methods[] = {"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-611" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-611', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1838"></a><tt class="py-lineno">1838</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-612" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-612', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1839"></a><tt class="py-lineno">1839</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">methdef</tt> <tt class="py-keyword">in</tt> <tt class="py-name">method_defs</tt><tt class="py-op">:</tt> </tt>
<a name="L1840"></a><tt class="py-lineno">1840</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-613" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-613', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-name">methdef</tt><tt class="py-op">)</tt> </tt>
<a name="L1841"></a><tt class="py-lineno">1841</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-614" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-614', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"{NULL, NULL, 0, NULL}"</tt><tt class="py-op">)</tt> </tt>
<a name="L1842"></a><tt class="py-lineno">1842</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-615" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-615', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1843"></a><tt class="py-lineno">1843</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-616" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-616', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"};"</tt><tt class="py-op">)</tt> </tt>
<a name="L1844"></a><tt class="py-lineno">1844</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_methods"</tt><tt class="py-op">,</tt> <tt class="py-string">"%s_methods"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-617" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-617', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1845"></a><tt class="py-lineno">1845</tt>  <tt class="py-line"> </tt>
<a name="CppClass._get_delete_code"></a><div id="CppClass._get_delete_code-def"><a name="L1846"></a><tt class="py-lineno">1846</tt> <a class="py-toggle" href="#" id="CppClass._get_delete_code-toggle" onclick="return toggle('CppClass._get_delete_code');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_get_delete_code">_get_delete_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._get_delete_code-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._get_delete_code-expanded"><a name="L1847"></a><tt class="py-lineno">1847</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">is_singleton</tt><tt class="py-op">:</tt> </tt>
<a name="L1848"></a><tt class="py-lineno">1848</tt>  <tt class="py-line">            <tt class="py-name">delete_code</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1849"></a><tt class="py-lineno">1849</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1850"></a><tt class="py-lineno">1850</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1851"></a><tt class="py-lineno">1851</tt>  <tt class="py-line">                <tt class="py-name">delete_code</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">"if (self-&gt;obj) {\n"</tt> </tt>
<a name="L1852"></a><tt class="py-lineno">1852</tt>  <tt class="py-line">                               <tt class="py-string">"    %s *tmp = self-&gt;obj;\n"</tt> </tt>
<a name="L1853"></a><tt class="py-lineno">1853</tt>  <tt class="py-line">                               <tt class="py-string">"    self-&gt;obj = NULL;\n"</tt> </tt>
<a name="L1854"></a><tt class="py-lineno">1854</tt>  <tt class="py-line">                               <tt class="py-string">"    %s\n"</tt> </tt>
<a name="L1855"></a><tt class="py-lineno">1855</tt>  <tt class="py-line">                               <tt class="py-string">"}"</tt> </tt>
<a name="L1856"></a><tt class="py-lineno">1856</tt>  <tt class="py-line">                               <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt><tt class="py-op">.</tt><tt id="link-618" class="py-name" targets="Method pybindgen.cppclass.FreeFunctionPolicy.get_free_code()=pybindgen.cppclass.FreeFunctionPolicy-class.html#get_free_code,Method pybindgen.cppclass.MemoryPolicy.get_free_code()=pybindgen.cppclass.MemoryPolicy-class.html#get_free_code,Method pybindgen.cppclass.ReferenceCountingFunctionsPolicy.get_free_code()=pybindgen.cppclass.ReferenceCountingFunctionsPolicy-class.html#get_free_code,Method pybindgen.cppclass.ReferenceCountingMethodsPolicy.get_free_code()=pybindgen.cppclass.ReferenceCountingMethodsPolicy-class.html#get_free_code"><a title="pybindgen.cppclass.FreeFunctionPolicy.get_free_code
pybindgen.cppclass.MemoryPolicy.get_free_code
pybindgen.cppclass.ReferenceCountingFunctionsPolicy.get_free_code
pybindgen.cppclass.ReferenceCountingMethodsPolicy.get_free_code" class="py-name" href="#" onclick="return doclink('link-618', 'get_free_code', 'link-618');">get_free_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'tmp'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1857"></a><tt class="py-lineno">1857</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1858"></a><tt class="py-lineno">1858</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">incomplete_type</tt><tt class="py-op">:</tt> </tt>
<a name="L1859"></a><tt class="py-lineno">1859</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt id="link-619" class="py-name"><a title="pybindgen.typehandlers.base.CodeGenerationError" class="py-name" href="#" onclick="return doclink('link-619', 'CodeGenerationError', 'link-5');">CodeGenerationError</a></tt><tt class="py-op">(</tt><tt class="py-string">"Cannot finish generating class %s: "</tt> </tt>
<a name="L1860"></a><tt class="py-lineno">1860</tt>  <tt class="py-line">                                              <tt class="py-string">"type is incomplete, but no free/unref_function defined"</tt> </tt>
<a name="L1861"></a><tt class="py-lineno">1861</tt>  <tt class="py-line">                                              <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">)</tt> </tt>
<a name="L1862"></a><tt class="py-lineno">1862</tt>  <tt class="py-line">                <tt class="py-name">delete_code</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">"    %s *tmp = self-&gt;obj;\n"</tt> </tt>
<a name="L1863"></a><tt class="py-lineno">1863</tt>  <tt class="py-line">                               <tt class="py-string">"    self-&gt;obj = NULL;\n"</tt> </tt>
<a name="L1864"></a><tt class="py-lineno">1864</tt>  <tt class="py-line">                               <tt class="py-string">"    delete tmp;"</tt> </tt>
<a name="L1865"></a><tt class="py-lineno">1865</tt>  <tt class="py-line">                               <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">full_name</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1866"></a><tt class="py-lineno">1866</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">delete_code</tt> </tt>
</div><a name="L1867"></a><tt class="py-lineno">1867</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_gc_methods"></a><div id="CppClass._generate_gc_methods-def"><a name="L1868"></a><tt class="py-lineno">1868</tt> <a class="py-toggle" href="#" id="CppClass._generate_gc_methods-toggle" onclick="return toggle('CppClass._generate_gc_methods');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_gc_methods">_generate_gc_methods</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_gc_methods-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_gc_methods-expanded"><a name="L1869"></a><tt class="py-lineno">1869</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generate tp_clear and tp_traverse"""</tt> </tt>
<a name="L1870"></a><tt class="py-lineno">1870</tt>  <tt class="py-line"> </tt>
<a name="L1871"></a><tt class="py-lineno">1871</tt>  <tt class="py-line">        <tt class="py-comment">## --- tp_clear ---</tt> </tt>
<a name="L1872"></a><tt class="py-lineno">1872</tt>  <tt class="py-line">        <tt class="py-name">tp_clear_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__tp_clear"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-620" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-620', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1873"></a><tt class="py-lineno">1873</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_clear"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_clear_function_name</tt> <tt class="py-op">)</tt> </tt>
<a name="L1874"></a><tt class="py-lineno">1874</tt>  <tt class="py-line">        <tt class="py-name">delete_code</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_get_delete_code</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1875"></a><tt class="py-lineno">1875</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-621" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-621', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L1876"></a><tt class="py-lineno">1876</tt>  <tt class="py-line"><tt class="py-string">static void</tt> </tt>
<a name="L1877"></a><tt class="py-lineno">1877</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self)</tt> </tt>
<a name="L1878"></a><tt class="py-lineno">1878</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1879"></a><tt class="py-lineno">1879</tt>  <tt class="py-line"><tt class="py-string">    Py_CLEAR(self-&gt;inst_dict);</tt> </tt>
<a name="L1880"></a><tt class="py-lineno">1880</tt>  <tt class="py-line"><tt class="py-string">    %s</tt> </tt>
<a name="L1881"></a><tt class="py-lineno">1881</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1882"></a><tt class="py-lineno">1882</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_clear_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-622" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-622', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-name">delete_code</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1883"></a><tt class="py-lineno">1883</tt>  <tt class="py-line"> </tt>
<a name="L1884"></a><tt class="py-lineno">1884</tt>  <tt class="py-line">        <tt class="py-comment">## --- tp_traverse ---</tt> </tt>
<a name="L1885"></a><tt class="py-lineno">1885</tt>  <tt class="py-line">        <tt class="py-name">tp_traverse_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"%s__tp_traverse"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-623" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-623', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1886"></a><tt class="py-lineno">1886</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_traverse"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_traverse_function_name</tt> <tt class="py-op">)</tt> </tt>
<a name="L1887"></a><tt class="py-lineno">1887</tt>  <tt class="py-line"> </tt>
<a name="L1888"></a><tt class="py-lineno">1888</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-624" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-624', 'helper_class', 'link-73');">helper_class</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L1889"></a><tt class="py-lineno">1889</tt>  <tt class="py-line">            <tt class="py-name">visit_self</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1890"></a><tt class="py-lineno">1890</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1891"></a><tt class="py-lineno">1891</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt><tt class="py-op">,</tt> <tt id="link-625" class="py-name"><a title="pybindgen.cppclass.ReferenceCountingMethodsPolicy" class="py-name" href="#" onclick="return doclink('link-625', 'ReferenceCountingMethodsPolicy', 'link-45');">ReferenceCountingMethodsPolicy</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L1892"></a><tt class="py-lineno">1892</tt>  <tt class="py-line">                <tt class="py-name">peekref_code</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L1893"></a><tt class="py-lineno">1893</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1894"></a><tt class="py-lineno">1894</tt>  <tt class="py-line">                <tt class="py-name">peekref_code</tt> <tt class="py-op">=</tt> <tt class="py-string">" &amp;&amp; self-&gt;obj-&gt;%s() == 1"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">memory_policy</tt><tt class="py-op">.</tt><tt class="py-name">peekref_method</tt> </tt>
<a name="L1895"></a><tt class="py-lineno">1895</tt>  <tt class="py-line">            <tt class="py-name">visit_self</tt> <tt class="py-op">=</tt> <tt class="py-string">'''</tt> </tt>
<a name="L1896"></a><tt class="py-lineno">1896</tt>  <tt class="py-line"><tt class="py-string">    if (self-&gt;obj &amp;&amp; typeid(*self-&gt;obj) == typeid(%s) %s)</tt> </tt>
<a name="L1897"></a><tt class="py-lineno">1897</tt>  <tt class="py-line"><tt class="py-string">        Py_VISIT((PyObject *) self);</tt> </tt>
<a name="L1898"></a><tt class="py-lineno">1898</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-626" class="py-name"><a title="pybindgen.cppmethod.CppMethod.helper_class
pybindgen.cppmethod.CppVirtualMethodProxy.helper_class" class="py-name" href="#" onclick="return doclink('link-626', 'helper_class', 'link-73');">helper_class</a></tt><tt class="py-op">.</tt><tt id="link-627" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-627', 'name', 'link-66');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">peekref_code</tt><tt class="py-op">)</tt> </tt>
<a name="L1899"></a><tt class="py-lineno">1899</tt>  <tt class="py-line"> </tt>
<a name="L1900"></a><tt class="py-lineno">1900</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-628" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-628', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L1901"></a><tt class="py-lineno">1901</tt>  <tt class="py-line"><tt class="py-string">static int</tt> </tt>
<a name="L1902"></a><tt class="py-lineno">1902</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self, visitproc visit, void *arg)</tt> </tt>
<a name="L1903"></a><tt class="py-lineno">1903</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1904"></a><tt class="py-lineno">1904</tt>  <tt class="py-line"><tt class="py-string">    Py_VISIT(self-&gt;inst_dict);</tt> </tt>
<a name="L1905"></a><tt class="py-lineno">1905</tt>  <tt class="py-line"><tt class="py-string">    %s</tt> </tt>
<a name="L1906"></a><tt class="py-lineno">1906</tt>  <tt class="py-line"><tt class="py-string">    return 0;</tt> </tt>
<a name="L1907"></a><tt class="py-lineno">1907</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1908"></a><tt class="py-lineno">1908</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_traverse_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-629" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-629', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-name">visit_self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1909"></a><tt class="py-lineno">1909</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_str"></a><div id="CppClass._generate_str-def"><a name="L1910"></a><tt class="py-lineno">1910</tt> <a class="py-toggle" href="#" id="CppClass._generate_str-toggle" onclick="return toggle('CppClass._generate_str');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_str">_generate_str</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_str-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_str-expanded"><a name="L1911"></a><tt class="py-lineno">1911</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generate a tp_str function and register it in the type"""</tt> </tt>
<a name="L1912"></a><tt class="py-lineno">1912</tt>  <tt class="py-line"> </tt>
<a name="L1913"></a><tt class="py-lineno">1913</tt>  <tt class="py-line">        <tt class="py-name">tp_str_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"_wrap_%s__tp_str"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-630" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-630', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1914"></a><tt class="py-lineno">1914</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_str"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_str_function_name</tt> <tt class="py-op">)</tt> </tt>
<a name="L1915"></a><tt class="py-lineno">1915</tt>  <tt class="py-line"> </tt>
<a name="L1916"></a><tt class="py-lineno">1916</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-631" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-631', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1917"></a><tt class="py-lineno">1917</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1918"></a><tt class="py-lineno">1918</tt>  <tt class="py-line"><tt class="py-string">static PyObject *</tt> </tt>
<a name="L1919"></a><tt class="py-lineno">1919</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self)</tt> </tt>
<a name="L1920"></a><tt class="py-lineno">1920</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1921"></a><tt class="py-lineno">1921</tt>  <tt class="py-line"><tt class="py-string">    std::ostringstream oss;</tt> </tt>
<a name="L1922"></a><tt class="py-lineno">1922</tt>  <tt class="py-line"><tt class="py-string">    oss &lt;&lt; *self-&gt;obj;</tt> </tt>
<a name="L1923"></a><tt class="py-lineno">1923</tt>  <tt class="py-line"><tt class="py-string">    return PyString_FromString(oss.str ().c_str ());</tt> </tt>
<a name="L1924"></a><tt class="py-lineno">1924</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1925"></a><tt class="py-lineno">1925</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1926"></a><tt class="py-lineno">1926</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_str_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-632" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-632', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1927"></a><tt class="py-lineno">1927</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_tp_hash"></a><div id="CppClass._generate_tp_hash-def"><a name="L1928"></a><tt class="py-lineno">1928</tt> <a class="py-toggle" href="#" id="CppClass._generate_tp_hash-toggle" onclick="return toggle('CppClass._generate_tp_hash');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_tp_hash">_generate_tp_hash</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_tp_hash-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_tp_hash-expanded"><a name="L1929"></a><tt class="py-lineno">1929</tt>  <tt class="py-line">        <tt class="py-docstring">"""generates a tp_hash function, which returns a hash of the self-&gt;obj pointer"""</tt> </tt>
<a name="L1930"></a><tt class="py-lineno">1930</tt>  <tt class="py-line"> </tt>
<a name="L1931"></a><tt class="py-lineno">1931</tt>  <tt class="py-line">        <tt class="py-name">tp_hash_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"_wrap_%s__tp_hash"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-633" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-633', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1932"></a><tt class="py-lineno">1932</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_hash"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_hash_function_name</tt> <tt class="py-op">)</tt> </tt>
<a name="L1933"></a><tt class="py-lineno">1933</tt>  <tt class="py-line"> </tt>
<a name="L1934"></a><tt class="py-lineno">1934</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-634" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-634', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1935"></a><tt class="py-lineno">1935</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1936"></a><tt class="py-lineno">1936</tt>  <tt class="py-line"><tt class="py-string">static long</tt> </tt>
<a name="L1937"></a><tt class="py-lineno">1937</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self)</tt> </tt>
<a name="L1938"></a><tt class="py-lineno">1938</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1939"></a><tt class="py-lineno">1939</tt>  <tt class="py-line"><tt class="py-string">    return (long) self-&gt;obj;</tt> </tt>
<a name="L1940"></a><tt class="py-lineno">1940</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1941"></a><tt class="py-lineno">1941</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1942"></a><tt class="py-lineno">1942</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_hash_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-635" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-635', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1943"></a><tt class="py-lineno">1943</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_tp_compare"></a><div id="CppClass._generate_tp_compare-def"><a name="L1944"></a><tt class="py-lineno">1944</tt> <a class="py-toggle" href="#" id="CppClass._generate_tp_compare-toggle" onclick="return toggle('CppClass._generate_tp_compare');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_tp_compare">_generate_tp_compare</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_tp_compare-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_tp_compare-expanded"><a name="L1945"></a><tt class="py-lineno">1945</tt>  <tt class="py-line">        <tt class="py-docstring">"""generates a tp_compare function, which compares the -&gt;obj pointers"""</tt> </tt>
<a name="L1946"></a><tt class="py-lineno">1946</tt>  <tt class="py-line"> </tt>
<a name="L1947"></a><tt class="py-lineno">1947</tt>  <tt class="py-line">        <tt class="py-name">tp_compare_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"_wrap_%s__tp_compare"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-636" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-636', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1948"></a><tt class="py-lineno">1948</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_compare"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_compare_function_name</tt> <tt class="py-op">)</tt> </tt>
<a name="L1949"></a><tt class="py-lineno">1949</tt>  <tt class="py-line"> </tt>
<a name="L1950"></a><tt class="py-lineno">1950</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-637" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-637', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'''</tt> </tt>
<a name="L1951"></a><tt class="py-lineno">1951</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1952"></a><tt class="py-lineno">1952</tt>  <tt class="py-line"><tt class="py-string">static int</tt> </tt>
<a name="L1953"></a><tt class="py-lineno">1953</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self, %s *other)</tt> </tt>
<a name="L1954"></a><tt class="py-lineno">1954</tt>  <tt class="py-line"><tt class="py-string">{</tt> </tt>
<a name="L1955"></a><tt class="py-lineno">1955</tt>  <tt class="py-line"><tt class="py-string">    if (self-&gt;obj == other-&gt;obj) return 0;</tt> </tt>
<a name="L1956"></a><tt class="py-lineno">1956</tt>  <tt class="py-line"><tt class="py-string">    if (self-&gt;obj &gt; other-&gt;obj)  return -1;</tt> </tt>
<a name="L1957"></a><tt class="py-lineno">1957</tt>  <tt class="py-line"><tt class="py-string">    return 1;</tt> </tt>
<a name="L1958"></a><tt class="py-lineno">1958</tt>  <tt class="py-line"><tt class="py-string">}</tt> </tt>
<a name="L1959"></a><tt class="py-lineno">1959</tt>  <tt class="py-line"><tt class="py-string"></tt> </tt>
<a name="L1960"></a><tt class="py-lineno">1960</tt>  <tt class="py-line"><tt class="py-string">'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_compare_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-638" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-638', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-639" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-639', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L1961"></a><tt class="py-lineno">1961</tt>  <tt class="py-line">         </tt>
<a name="L1962"></a><tt class="py-lineno">1962</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_destructor"></a><div id="CppClass._generate_destructor-def"><a name="L1963"></a><tt class="py-lineno">1963</tt> <a class="py-toggle" href="#" id="CppClass._generate_destructor-toggle" onclick="return toggle('CppClass._generate_destructor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_destructor">_generate_destructor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">,</tt> <tt class="py-param">have_constructor</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_destructor-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_destructor-expanded"><a name="L1964"></a><tt class="py-lineno">1964</tt>  <tt class="py-line">        <tt class="py-docstring">"""Generate a tp_dealloc function and register it in the type"""</tt> </tt>
<a name="L1965"></a><tt class="py-lineno">1965</tt>  <tt class="py-line"> </tt>
<a name="L1966"></a><tt class="py-lineno">1966</tt>  <tt class="py-line">        <tt class="py-comment">## don't generate destructor if overridden by user</tt> </tt>
<a name="L1967"></a><tt class="py-lineno">1967</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">"tp_dealloc"</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">:</tt> </tt>
<a name="L1968"></a><tt class="py-lineno">1968</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L1969"></a><tt class="py-lineno">1969</tt>  <tt class="py-line"> </tt>
<a name="L1970"></a><tt class="py-lineno">1970</tt>  <tt class="py-line">        <tt class="py-name">tp_dealloc_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"_wrap_%s__tp_dealloc"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-640" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-640', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L1971"></a><tt class="py-lineno">1971</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-641" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-641', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">r'''</tt> </tt>
<a name="L1972"></a><tt class="py-lineno">1972</tt>  <tt class="py-line"><tt class="py-string">static void</tt> </tt>
<a name="L1973"></a><tt class="py-lineno">1973</tt>  <tt class="py-line"><tt class="py-string">%s(%s *self)</tt> </tt>
<a name="L1974"></a><tt class="py-lineno">1974</tt>  <tt class="py-line"><tt class="py-string">{'''</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_dealloc_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-642" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-642', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1975"></a><tt class="py-lineno">1975</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-643" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-643', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1976"></a><tt class="py-lineno">1976</tt>  <tt class="py-line"> </tt>
<a name="L1977"></a><tt class="py-lineno">1977</tt>  <tt class="py-line">        <tt id="link-644" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-644', 'code_block', 'link-47');">code_block</a></tt> <tt class="py-op">=</tt> <tt id="link-645" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock" class="py-name" href="#" onclick="return doclink('link-645', 'CodeBlock', 'link-10');">CodeBlock</a></tt><tt class="py-op">(</tt><tt class="py-string">"PyErr_Print(); return;"</tt><tt class="py-op">,</tt> <tt id="link-646" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope" class="py-name" href="#" onclick="return doclink('link-646', 'DeclarationsScope', 'link-9');">DeclarationsScope</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1978"></a><tt class="py-lineno">1978</tt>  <tt class="py-line"> </tt>
<a name="L1979"></a><tt class="py-lineno">1979</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-647" class="py-name"><a title="pybindgen.cppclass.CppClass.wrapper_registry
pybindgen.wrapper_registry" class="py-name" href="#" onclick="return doclink('link-647', 'wrapper_registry', 'link-439');">wrapper_registry</a></tt><tt class="py-op">.</tt><tt id="link-648" class="py-name" targets="Method pybindgen.wrapper_registry.NullWrapperRegistry.write_unregister_wrapper()=pybindgen.wrapper_registry.NullWrapperRegistry-class.html#write_unregister_wrapper,Method pybindgen.wrapper_registry.StdMapWrapperRegistry.write_unregister_wrapper()=pybindgen.wrapper_registry.StdMapWrapperRegistry-class.html#write_unregister_wrapper,Method pybindgen.wrapper_registry.WrapperRegistry.write_unregister_wrapper()=pybindgen.wrapper_registry.WrapperRegistry-class.html#write_unregister_wrapper"><a title="pybindgen.wrapper_registry.NullWrapperRegistry.write_unregister_wrapper
pybindgen.wrapper_registry.StdMapWrapperRegistry.write_unregister_wrapper
pybindgen.wrapper_registry.WrapperRegistry.write_unregister_wrapper" class="py-name" href="#" onclick="return doclink('link-648', 'write_unregister_wrapper', 'link-648');">write_unregister_wrapper</a></tt><tt class="py-op">(</tt><tt id="link-649" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-649', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">,</tt> <tt class="py-string">'self'</tt><tt class="py-op">,</tt> <tt class="py-string">'self-&gt;obj'</tt><tt class="py-op">)</tt> </tt>
<a name="L1980"></a><tt class="py-lineno">1980</tt>  <tt class="py-line"> </tt>
<a name="L1981"></a><tt class="py-lineno">1981</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-650" class="py-name"><a title="pybindgen.settings.allow_subclassing" class="py-name" href="#" onclick="return doclink('link-650', 'allow_subclassing', 'link-191');">allow_subclassing</a></tt><tt class="py-op">:</tt> </tt>
<a name="L1982"></a><tt class="py-lineno">1982</tt>  <tt class="py-line">            <tt id="link-651" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-651', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-652" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-652', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">"%s(self);"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">[</tt><tt class="py-string">"tp_clear"</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L1983"></a><tt class="py-lineno">1983</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L1984"></a><tt class="py-lineno">1984</tt>  <tt class="py-line">            <tt id="link-653" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-653', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-654" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-654', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_get_delete_code</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L1985"></a><tt class="py-lineno">1985</tt>  <tt class="py-line"> </tt>
<a name="L1986"></a><tt class="py-lineno">1986</tt>  <tt class="py-line">        <tt id="link-655" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-655', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-656" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-656', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt><tt class="py-string">'self-&gt;ob_type-&gt;tp_free((PyObject*)self);'</tt><tt class="py-op">)</tt> </tt>
<a name="L1987"></a><tt class="py-lineno">1987</tt>  <tt class="py-line"> </tt>
<a name="L1988"></a><tt class="py-lineno">1988</tt>  <tt class="py-line">        <tt id="link-657" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-657', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt id="link-658" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_cleanup" class="py-name" href="#" onclick="return doclink('link-658', 'write_cleanup', 'link-592');">write_cleanup</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1989"></a><tt class="py-lineno">1989</tt>  <tt class="py-line">         </tt>
<a name="L1990"></a><tt class="py-lineno">1990</tt>  <tt class="py-line">        <tt id="link-659" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-659', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt class="py-name">declarations</tt><tt class="py-op">.</tt><tt id="link-660" class="py-name"><a title="pybindgen.typehandlers.base.DeclarationsScope.get_code_sink" class="py-name" href="#" onclick="return doclink('link-660', 'get_code_sink', 'link-589');">get_code_sink</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-661" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-661', 'flush_to', 'link-90');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1991"></a><tt class="py-lineno">1991</tt>  <tt class="py-line">        <tt id="link-662" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.CleanupHandle.code_block" class="py-name" href="#" onclick="return doclink('link-662', 'code_block', 'link-47');">code_block</a></tt><tt class="py-op">.</tt><tt class="py-name">sink</tt><tt class="py-op">.</tt><tt id="link-663" class="py-name"><a title="pybindgen.typehandlers.codesink.MemoryCodeSink.flush_to
pybindgen.typehandlers.codesink.NullCodeSink.flush_to" class="py-name" href="#" onclick="return doclink('link-663', 'flush_to', 'link-90');">flush_to</a></tt><tt class="py-op">(</tt><tt class="py-name">code_sink</tt><tt class="py-op">)</tt> </tt>
<a name="L1992"></a><tt class="py-lineno">1992</tt>  <tt class="py-line"> </tt>
<a name="L1993"></a><tt class="py-lineno">1993</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-664" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-664', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L1994"></a><tt class="py-lineno">1994</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-665" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-665', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">'}\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L1995"></a><tt class="py-lineno">1995</tt>  <tt class="py-line"> </tt>
<a name="L1996"></a><tt class="py-lineno">1996</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">slots</tt><tt class="py-op">.</tt><tt class="py-name">setdefault</tt><tt class="py-op">(</tt><tt class="py-string">"tp_dealloc"</tt><tt class="py-op">,</tt> <tt class="py-name">tp_dealloc_function_name</tt> <tt class="py-op">)</tt> </tt>
</div><a name="L1997"></a><tt class="py-lineno">1997</tt>  <tt class="py-line"> </tt>
<a name="L1998"></a><tt class="py-lineno">1998</tt>  <tt class="py-line"> </tt>
<a name="CppClass._generate_tp_richcompare"></a><div id="CppClass._generate_tp_richcompare-def"><a name="L1999"></a><tt class="py-lineno">1999</tt> <a class="py-toggle" href="#" id="CppClass._generate_tp_richcompare-toggle" onclick="return toggle('CppClass._generate_tp_richcompare');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#_generate_tp_richcompare">_generate_tp_richcompare</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">code_sink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass._generate_tp_richcompare-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass._generate_tp_richcompare-expanded"><a name="L2000"></a><tt class="py-lineno">2000</tt>  <tt class="py-line">        <tt class="py-name">tp_richcompare_function_name</tt> <tt class="py-op">=</tt> <tt class="py-string">"_wrap_%s__tp_richcompare"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-666" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-666', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt><tt class="py-op">)</tt> </tt>
<a name="L2001"></a><tt class="py-lineno">2001</tt>  <tt class="py-line"> </tt>
<a name="L2002"></a><tt class="py-lineno">2002</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-667" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-667', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"static PyObject*\n%s (%s *PYBINDGEN_UNUSED(self), %s *other, int opid)"</tt> </tt>
<a name="L2003"></a><tt class="py-lineno">2003</tt>  <tt class="py-line">                          <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">tp_richcompare_function_name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-668" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-668', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-669" class="py-name"><a title="pybindgen.container.Container.pystruct
pybindgen.cppclass.CppClass.pystruct" class="py-name" href="#" onclick="return doclink('link-669', 'pystruct', 'link-68');">pystruct</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2004"></a><tt class="py-lineno">2004</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-670" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-670', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"{"</tt><tt class="py-op">)</tt> </tt>
<a name="L2005"></a><tt class="py-lineno">2005</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-671" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-671', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2006"></a><tt class="py-lineno">2006</tt>  <tt class="py-line"> </tt>
<a name="L2007"></a><tt class="py-lineno">2007</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-672" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-672', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"""</tt> </tt>
<a name="L2008"></a><tt class="py-lineno">2008</tt>  <tt class="py-line"><tt class="py-string">if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &amp;%s)) {</tt> </tt>
<a name="L2009"></a><tt class="py-lineno">2009</tt>  <tt class="py-line"><tt class="py-string">    Py_INCREF(Py_NotImplemented);</tt> </tt>
<a name="L2010"></a><tt class="py-lineno">2010</tt>  <tt class="py-line"><tt class="py-string">    return Py_NotImplemented;</tt> </tt>
<a name="L2011"></a><tt class="py-lineno">2011</tt>  <tt class="py-line"><tt class="py-string">}"""</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt> </tt>
<a name="L2012"></a><tt class="py-lineno">2012</tt>  <tt class="py-line"> </tt>
<a name="L2013"></a><tt class="py-lineno">2013</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-673" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-673', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"switch (opid)\n{"</tt><tt class="py-op">)</tt> </tt>
<a name="L2014"></a><tt class="py-lineno">2014</tt>  <tt class="py-line"> </tt>
<a name="L2015"></a><tt class="py-lineno">2015</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">opid_code</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L2016"></a><tt class="py-lineno">2016</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-674" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-674', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"case %s:"</tt> <tt class="py-op">%</tt> <tt class="py-name">opid_code</tt><tt class="py-op">)</tt> </tt>
<a name="L2017"></a><tt class="py-lineno">2017</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-675" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.indent
pybindgen.typehandlers.codesink.CodeSink.indent" class="py-name" href="#" onclick="return doclink('link-675', 'indent', 'link-94');">indent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2018"></a><tt class="py-lineno">2018</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt id="link-676" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-676', 'name', 'link-66');">name</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">binary_comparison_operators</tt><tt class="py-op">:</tt> </tt>
<a name="L2019"></a><tt class="py-lineno">2019</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-677" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-677', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"if (*self-&gt;obj %(OP)s *other-&gt;obj) {\n"</tt> </tt>
<a name="L2020"></a><tt class="py-lineno">2020</tt>  <tt class="py-line">                                  <tt class="py-string">"    Py_INCREF(Py_True);\n"</tt> </tt>
<a name="L2021"></a><tt class="py-lineno">2021</tt>  <tt class="py-line">                                  <tt class="py-string">"    return Py_True;\n"</tt> </tt>
<a name="L2022"></a><tt class="py-lineno">2022</tt>  <tt class="py-line">                                  <tt class="py-string">"} else {\n"</tt> </tt>
<a name="L2023"></a><tt class="py-lineno">2023</tt>  <tt class="py-line">                                  <tt class="py-string">"    Py_INCREF(Py_False);\n"</tt> </tt>
<a name="L2024"></a><tt class="py-lineno">2024</tt>  <tt class="py-line">                                  <tt class="py-string">"    return Py_False;\n"</tt> </tt>
<a name="L2025"></a><tt class="py-lineno">2025</tt>  <tt class="py-line">                                  <tt class="py-string">"}"</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">OP</tt><tt class="py-op">=</tt><tt id="link-678" class="py-name"><a title="pybindgen.module.ModuleBase.name" class="py-name" href="#" onclick="return doclink('link-678', 'name', 'link-66');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L2026"></a><tt class="py-lineno">2026</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L2027"></a><tt class="py-lineno">2027</tt>  <tt class="py-line">                <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-679" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-679', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_INCREF(Py_NotImplemented);\n"</tt> </tt>
<a name="L2028"></a><tt class="py-lineno">2028</tt>  <tt class="py-line">                                  <tt class="py-string">"return Py_NotImplemented;"</tt><tt class="py-op">)</tt> </tt>
<a name="L2029"></a><tt class="py-lineno">2029</tt>  <tt class="py-line">            <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-680" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-680', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L2030"></a><tt class="py-lineno">2030</tt>  <tt class="py-line">         </tt>
<a name="L2031"></a><tt class="py-lineno">2031</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_LT'</tt><tt class="py-op">)</tt> </tt>
<a name="L2032"></a><tt class="py-lineno">2032</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;='</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_LE'</tt><tt class="py-op">)</tt> </tt>
<a name="L2033"></a><tt class="py-lineno">2033</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'=='</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_EQ'</tt><tt class="py-op">)</tt> </tt>
<a name="L2034"></a><tt class="py-lineno">2034</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'!='</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_NE'</tt><tt class="py-op">)</tt> </tt>
<a name="L2035"></a><tt class="py-lineno">2035</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;='</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_GE'</tt><tt class="py-op">)</tt> </tt>
<a name="L2036"></a><tt class="py-lineno">2036</tt>  <tt class="py-line">        <tt class="py-name">wrap_operator</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;'</tt><tt class="py-op">,</tt> <tt class="py-string">'Py_GT'</tt><tt class="py-op">)</tt> </tt>
<a name="L2037"></a><tt class="py-lineno">2037</tt>  <tt class="py-line"> </tt>
<a name="L2038"></a><tt class="py-lineno">2038</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-681" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-681', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"} /* closes switch (opid) */"</tt><tt class="py-op">)</tt> </tt>
<a name="L2039"></a><tt class="py-lineno">2039</tt>  <tt class="py-line"> </tt>
<a name="L2040"></a><tt class="py-lineno">2040</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-682" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-682', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"Py_INCREF(Py_NotImplemented);\n"</tt> </tt>
<a name="L2041"></a><tt class="py-lineno">2041</tt>  <tt class="py-line">                          <tt class="py-string">"return Py_NotImplemented;"</tt><tt class="py-op">)</tt> </tt>
<a name="L2042"></a><tt class="py-lineno">2042</tt>  <tt class="py-line"> </tt>
<a name="L2043"></a><tt class="py-lineno">2043</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-683" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.unindent
pybindgen.typehandlers.codesink.CodeSink.unindent" class="py-name" href="#" onclick="return doclink('link-683', 'unindent', 'link-112');">unindent</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L2044"></a><tt class="py-lineno">2044</tt>  <tt class="py-line">        <tt class="py-name">code_sink</tt><tt class="py-op">.</tt><tt id="link-684" class="py-name"><a title="pybindgen.typehandlers.codesink.CodeSink.writeln
pybindgen.typehandlers.codesink.FileCodeSink.writeln
pybindgen.typehandlers.codesink.MemoryCodeSink.writeln
pybindgen.typehandlers.codesink.NullCodeSink.writeln" class="py-name" href="#" onclick="return doclink('link-684', 'writeln', 'link-91');">writeln</a></tt><tt class="py-op">(</tt><tt class="py-string">"}\n"</tt><tt class="py-op">)</tt> </tt>
<a name="L2045"></a><tt class="py-lineno">2045</tt>  <tt class="py-line"> </tt>
<a name="L2046"></a><tt class="py-lineno">2046</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tp_richcompare_function_name</tt> </tt>
</div><a name="L2047"></a><tt class="py-lineno">2047</tt>  <tt class="py-line"> </tt>
<a name="CppClass.generate_typedef"></a><div id="CppClass.generate_typedef-def"><a name="L2048"></a><tt class="py-lineno">2048</tt> <a class="py-toggle" href="#" id="CppClass.generate_typedef-toggle" onclick="return toggle('CppClass.generate_typedef');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pybindgen.cppclass.CppClass-class.html#generate_typedef">generate_typedef</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">module</tt><tt class="py-op">,</tt> <tt class="py-param">alias</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CppClass.generate_typedef-collapsed" style="display:none;" pad="++++" indent="++++++++"></div><div id="CppClass.generate_typedef-expanded"><a name="L2049"></a><tt class="py-lineno">2049</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L2050"></a><tt class="py-lineno">2050</tt>  <tt class="py-line"><tt class="py-docstring">        Generates the appropriate Module code to register the class</tt> </tt>
<a name="L2051"></a><tt class="py-lineno">2051</tt>  <tt class="py-line"><tt class="py-docstring">        with a new name in that module (typedef alias).</tt> </tt>
<a name="L2052"></a><tt class="py-lineno">2052</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L2053"></a><tt class="py-lineno">2053</tt>  <tt class="py-line">        <tt id="link-685" class="py-name"><a title="pybindgen.container.Container.module
pybindgen.cppclass.CppClass.module
pybindgen.enum.Enum.module
pybindgen.function.Function.module
pybindgen.module" class="py-name" href="#" onclick="return doclink('link-685', 'module', 'link-237');">module</a></tt><tt class="py-op">.</tt><tt class="py-name">after_init</tt><tt class="py-op">.</tt><tt id="link-686" class="py-name"><a title="pybindgen.typehandlers.base.CodeBlock.write_code" class="py-name" href="#" onclick="return doclink('link-686', 'write_code', 'link-48');">write_code</a></tt><tt class="py-op">(</tt> </tt>
<a name="L2054"></a><tt class="py-lineno">2054</tt>  <tt class="py-line">            <tt class="py-string">'PyModule_AddObject(m, (char *) \"%s\", (PyObject *) &amp;%s);'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
<a name="L2055"></a><tt class="py-lineno">2055</tt>  <tt class="py-line">                <tt class="py-name">alias</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pytypestruct</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L2056"></a><tt class="py-lineno">2056</tt>  <tt class="py-line">         </tt>
<a name="L2057"></a><tt class="py-lineno">2057</tt>  <tt class="py-line"> </tt>
<a name="L2058"></a><tt class="py-lineno">2058</tt>  <tt class="py-line"> </tt>
<a name="L2059"></a><tt class="py-lineno">2059</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-687" class="py-name" targets="Module pybindgen.cppclass_typehandlers=pybindgen.cppclass_typehandlers-module.html"><a title="pybindgen.cppclass_typehandlers" class="py-name" href="#" onclick="return doclink('link-687', 'cppclass_typehandlers', 'link-687');">cppclass_typehandlers</a></tt> <tt class="py-keyword">import</tt> <tt id="link-688" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameter" class="py-name" href="#" onclick="return doclink('link-688', 'CppClassParameter', 'link-382');">CppClassParameter</a></tt><tt class="py-op">,</tt> <tt id="link-689" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassRefParameter" class="py-name" href="#" onclick="return doclink('link-689', 'CppClassRefParameter', 'link-381');">CppClassRefParameter</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L2060"></a><tt class="py-lineno">2060</tt>  <tt class="py-line">    <tt id="link-690" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassReturnValue=pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassReturnValue" class="py-name" href="#" onclick="return doclink('link-690', 'CppClassReturnValue', 'link-690');">CppClassReturnValue</a></tt><tt class="py-op">,</tt> <tt id="link-691" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassPtrParameter=pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassPtrParameter" class="py-name" href="#" onclick="return doclink('link-691', 'CppClassPtrParameter', 'link-691');">CppClassPtrParameter</a></tt><tt class="py-op">,</tt> <tt id="link-692" class="py-name" targets="Class pybindgen.cppclass_typehandlers.CppClassPtrReturnValue=pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html"><a title="pybindgen.cppclass_typehandlers.CppClassPtrReturnValue" class="py-name" href="#" onclick="return doclink('link-692', 'CppClassPtrReturnValue', 'link-692');">CppClassPtrReturnValue</a></tt><tt class="py-op">,</tt> <tt id="link-693" class="py-name"><a title="pybindgen.cppclass_typehandlers.CppClassParameterBase" class="py-name" href="#" onclick="return doclink('link-693', 'CppClassParameterBase', 'link-319');">CppClassParameterBase</a></tt> </tt>
<a name="L2061"></a><tt class="py-lineno">2061</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-694" class="py-name"><a title="pybindgen.function" class="py-name" href="#" onclick="return doclink('link-694', 'function', 'link-315');">function</a></tt> </tt>
<a name="L2062"></a><tt class="py-lineno">2062</tt>  <tt class="py-line"> </tt>
<a name="L2063"></a><tt class="py-lineno">2063</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-695" class="py-name" targets="Module pybindgen.cppmethod=pybindgen.cppmethod-module.html"><a title="pybindgen.cppmethod" class="py-name" href="#" onclick="return doclink('link-695', 'cppmethod', 'link-695');">cppmethod</a></tt> <tt class="py-keyword">import</tt> <tt id="link-696" class="py-name"><a title="pybindgen.cppmethod.CppMethod" class="py-name" href="#" onclick="return doclink('link-696', 'CppMethod', 'link-243');">CppMethod</a></tt><tt class="py-op">,</tt> <tt id="link-697" class="py-name"><a title="pybindgen.cppmethod.CppConstructor" class="py-name" href="#" onclick="return doclink('link-697', 'CppConstructor', 'link-379');">CppConstructor</a></tt><tt class="py-op">,</tt> <tt id="link-698" class="py-name"><a title="pybindgen.cppmethod.CppNoConstructor" class="py-name" href="#" onclick="return doclink('link-698', 'CppNoConstructor', 'link-562');">CppNoConstructor</a></tt><tt class="py-op">,</tt> <tt id="link-699" class="py-name"><a title="pybindgen.cppmethod.CppFunctionAsConstructor" class="py-name" href="#" onclick="return doclink('link-699', 'CppFunctionAsConstructor', 'link-391');">CppFunctionAsConstructor</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L2064"></a><tt class="py-lineno">2064</tt>  <tt class="py-line">    <tt id="link-700" class="py-name"><a title="pybindgen.cppmethod.CppOverloadedMethod" class="py-name" href="#" onclick="return doclink('link-700', 'CppOverloadedMethod', 'link-80');">CppOverloadedMethod</a></tt><tt class="py-op">,</tt> <tt id="link-701" class="py-name"><a title="pybindgen.cppmethod.CppOverloadedConstructor" class="py-name" href="#" onclick="return doclink('link-701', 'CppOverloadedConstructor', 'link-552');">CppOverloadedConstructor</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L2065"></a><tt class="py-lineno">2065</tt>  <tt class="py-line">    <tt id="link-702" class="py-name"><a title="pybindgen.cppmethod.CppVirtualMethodParentCaller" class="py-name" href="#" onclick="return doclink('link-702', 'CppVirtualMethodParentCaller', 'link-72');">CppVirtualMethodParentCaller</a></tt><tt class="py-op">,</tt> <tt id="link-703" class="py-name"><a title="pybindgen.cppmethod.CppVirtualMethodProxy" class="py-name" href="#" onclick="return doclink('link-703', 'CppVirtualMethodProxy', 'link-75');">CppVirtualMethodProxy</a></tt><tt class="py-op">,</tt> <tt id="link-704" class="py-name"><a title="pybindgen.cppmethod.CustomCppMethodWrapper" class="py-name" href="#" onclick="return doclink('link-704', 'CustomCppMethodWrapper', 'link-375');">CustomCppMethodWrapper</a></tt><tt class="py-op">,</tt> \ </tt>
<a name="L2066"></a><tt class="py-lineno">2066</tt>  <tt class="py-line">    <tt id="link-705" class="py-name"><a title="pybindgen.cppmethod.CppDummyMethod" class="py-name" href="#" onclick="return doclink('link-705', 'CppDummyMethod', 'link-71');">CppDummyMethod</a></tt> </tt>
<a name="L2067"></a><tt class="py-lineno">2067</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 12 17:23:44 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
